Author Topic: Changing walls via logic block in DC0.914 and DC2.x and importing levels  (Read 329 times)

Offline Dinonykos

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2294
    • Dinonykos Dungeon Craft
I moved the discussion concerning changing walls via logic block to this new thread.

I thought that the numbers were matching up, but the tabs in the editor were showing the wrong number . Since this is apparently not the case, I think this is a bit bigger deal now.

Quote
the wall numbering is still shifted by one in the editor.
The editor is supposed to number the walls starting with one. Ordinals.
Did you define the global variable that says you want your
scripts to use numbers starting with zero?  Indexes.
Paul, you are just surpassing my limits...  :o

This is what I understand (sorry for redundancies to earlier posts, but I guess the problem is still unclear, and the topic might be interesting for "newcomers", too):

The 1st screenshot below shows how you can change walls via the logic block event, and the 2nd shows what the wall menu looks like in 0.914. As you can see, the walls are numbered 1-16, 17-32, and so on in the tabs of the wall menu. It is the same way in the newer DC versions.

SET LEVEL ASL "$WALL,1,1,E=2" sets the wall in the East of square 1,1 in the level the party currently visits to a wall in the wall menu.
The difference is this:
In DC0.914, "$WALL,1,1,E=2" results in wall number 3 being shown in game. This is probably because the old editor numbers the walls starting with 0.
In DC2.x, "$WALL,1,1,E=2" results in wall number 2 being shown in game. Obviously the newer editor numbers the walls starting with 1, as Paul stated above.

When importing a level from a design made in 0.914 to newer editor versions, this results in the "wrong" wall being depicted. This is what I meant by "shifted by one" in my earlier post.
This can be a problem when importing old designs which contain numerous logic blocks changing walls.
Find four contributions to the Pre-Generated Character Mini-Module Design Contest on my homepage.
New: THE AMBASSADOR'S LETTER, my contribution to the 7-day-challenge.
DINONYKOS DUNGEON CRAFT DESIGN HOMEPAGE

Offline Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2201
Re: Changing walls via logic block in DC0.914 and DC2.x and importing levels
« Reply #1 on: September 27, 2016, 11:31:54 AM »
Everything you say is quite true.  The new editor and engine
treat the wall numbers as 'ordinals' (Starting with 1).  Sorry about
that.  But you want '2' to show the third wall......You want
the engine to use 'indexes'.

There is a way to tell the engine that the numbers are indexes.
I mentioned it in a previous post but I'll try to be more
specific:

Define a Global ASL named "UseWallIndex".  Then when your
0.914 module says '2' it will mean the third wall (Wall 3 in the editor).
(0, 1, 2  means the first, second, and third wall).
Global/Global Settings/Global Attributes/Add
set name = UseWallIndex
set value to anything you like....I set it to 1
press OK three times and save.

This will have no effect in 0.914 but in the new engines
it will cause numbers you specify in Logic Block or any other
scripts to be interpreted as wall indexes.

Offline Dinonykos

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2294
    • Dinonykos Dungeon Craft
Re: Changing walls via logic block in DC0.914 and DC2.x and importing levels
« Reply #2 on: September 27, 2016, 01:23:13 PM »
 :o

THANK YOU!  ;D
Works excellent!
Find four contributions to the Pre-Generated Character Mini-Module Design Contest on my homepage.
New: THE AMBASSADOR'S LETTER, my contribution to the 7-day-challenge.
DINONYKOS DUNGEON CRAFT DESIGN HOMEPAGE

Offline Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2201
Re: Changing walls via logic block in DC0.914 and DC2.x and importing levels
« Reply #3 on: September 27, 2016, 01:29:10 PM »
Quote from: Dinonykos
Works

What a pleasant word.

Online manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9712
Re: Changing walls via logic block in DC0.914 and DC2.x and importing levels
« Reply #4 on: September 27, 2016, 01:49:42 PM »
This sounds like a good solution. I think it is pretty clear, Paul. Dinonykos, let me know if you need further assistance.

Offline Dinonykos

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2294
    • Dinonykos Dungeon Craft
Re: Changing walls via logic block in DC0.914 and DC2.x and importing levels
« Reply #5 on: September 28, 2016, 12:08:31 AM »
Probably I should have written: "Works excellently" instead of "Works excellent"...

This sounds like a good solution. I think it is pretty clear, Paul. Dinonykos, let me know if you need further assistance.
I only realized again that I lack mathematical vocabulary...  ::) Fortunately, Paul shows extraordinary patience. :)

I will perhaps return to the other point of checking equipped item in another thread, but currently, I am still working on art...
Find four contributions to the Pre-Generated Character Mini-Module Design Contest on my homepage.
New: THE AMBASSADOR'S LETTER, my contribution to the 7-day-challenge.
DINONYKOS DUNGEON CRAFT DESIGN HOMEPAGE