I'm getting extreme headaches trying to create a script to disable Magic Springs and Magic Wells from appearing in Random Maps. Can anyone help me?
I tried
!?OB48;
!!OB48:S;
and
!?OB49;
!!OB49:S;
but it doesn't work.
Could someone post proper commands to prevent Players and Computers from using Magic Wells and Magic Springs or to completely prevent these map objects from appearing upon creation of random maps?
Thanks in advance.
Help : Script to disable Magic Springs and Wells
Re: Help : Script to disable Magic Springs and Wells
While you can use the object type as a trigger, you have to use specific coordinates for the receiver. However, all objects will have their coordinates stored in v998/v999/v1000 when a hero visits them, so you can do the following:Farilis wrote:I'm getting extreme headaches trying to create a script to disable Magic Springs and Magic Wells from appearing in Random Maps. Can anyone help me?
I tried
!?OB48;
!!OB48:S;
and
!?OB49;
!!OB49:S;
but it doesn't work.
Could someone post proper commands to prevent Players and Computers from using Magic Wells and Magic Springs or to completely prevent these map objects from appearing upon creation of random maps?
Thanks in advance.
Code: Select all
!?OB49;
!!OBv998/v999/v1000:S;
Code: Select all
!?OB49;
!!OB998:S;
Unfortunately, this disabling will NOT give the desired results for the AI. The AI hero won't be able to use the Magic Well but it won't understand this and will go there anyway. When it reaches the Well it won't get its mana restored. Next turn it will try again. And again. And again.
You can get around this by changing the Magic Well square from a yellow trigger square to a non-yellow, red "impassable" square with the TR command.
Try the following:
Code: Select all
!?OB49;
!!OB998:S; [Disable object]
!!TR998:E1 P0; [Change yellow trigger to red impassible]
Something like this might work...
Code: Select all
!?PI;
!!UN:U49/-1/?y-1; [Get number of Magic Wells on map]
!!VRv1:S-1; [Initialize v1 to -1 for fast UN:U looping]
!!DO29600/1/y-1/1; [Loop through all Magic Wells on map]
!?FU29600;
!!UN:U49/-1/-1/1; [Get coordinates of next Magic Well into v1/v2/v3]
!!UN:Ov1/v2/v3; [Delete Magic Well]
- Fnord
Oh, I see. Thanks a lot for the for the codes, Fnord.
I'm going to test them now.
---------------
'Kay... I tested them.
This code gave me errors.
-------------------------
This one below works wonderfully, tee hee. So, I think this is the one I'm going to use. Thanks again for the help. Finally, my headache's gone.
I'm going to test them now.
---------------
'Kay... I tested them.
This code gave me errors.
!?PI;
!!UN:U49/-1/?y-1; [Get number of Magic Wells on map]
!!VRv1:S-1; [Initialize v1 to -1 for fast UN:U looping]
!!DO29600/1/y-1/1; [Loop through all Magic Wells on map]
!?FU29600;
!!UN:U49/-1/-1/1; [Get coordinates of next Magic Well into v1/v2/v3]
!!UN:Ov1/v2/v3; [Delete Magic Well]
-------------------------
This one below works wonderfully, tee hee. So, I think this is the one I'm going to use. Thanks again for the help. Finally, my headache's gone.
!?OB49;
!!OB998:S; [Disable object]
!!TR998:E1 P0; [Change yellow trigger to red impassible]
disable object appearance
Hi,
so basically there is no chance to disable certain objects from appearing in random maps. With erm you only have the chance to remove them after map creation and before first day. Is this correct?
I think i saw a text file related to random map creation in the h3bitmap.lod, but it may also instead be related to the "brush" in the map editor, i don't know. If this file is related to random map creation then it may be possible to really prevent these objects from beeing generated at all.
As far as i do recall, the random map generator template file Rmg.txt does not allow to exclude certain objects from appearing. Only resource piles, chests, dwellings and towns.
so basically there is no chance to disable certain objects from appearing in random maps. With erm you only have the chance to remove them after map creation and before first day. Is this correct?
I think i saw a text file related to random map creation in the h3bitmap.lod, but it may also instead be related to the "brush" in the map editor, i don't know. If this file is related to random map creation then it may be possible to really prevent these objects from beeing generated at all.
As far as i do recall, the random map generator template file Rmg.txt does not allow to exclude certain objects from appearing. Only resource piles, chests, dwellings and towns.
Who is online
Users browsing this forum: No registered users and 2 guests