|
Thread: Placing new objects images | |
|
Felipe
Known Hero
Editing Heroes Without Limits
|
posted November 07, 2012 04:37 PM |
|
|
Placing new objects images
In this patch:
http://bers.heroes35.net/mods/New%20Objects%20Patch.exe
(Author: Black Phantom, FCst1, Valery and others. More than 2400 objects for map editor)
We have a lot of new objects. Some of them are old objects with new images like the a new type of learning stone, magic well, etc...
My wish was to replace some of the old learning stones by the new one. Just to make the map more interesting.
When I tried this command (A WOG command):
!!VRy20:S0; [initialize object counter to 0]
!!UN60/?y3; [check if Forgotten Shrine script is enabled]
!!UN149/?y4; check if mithril enhancements is enabled
!!VRy3|y21=0/y4<>1:S0; [set y3 to 0 if Replace Objects or mithril enhancements aren't enabled]
!!VRy20&y3=1:+1; [add one to object counter]
!!VRy11&y3=1:Sy20 *7; [number to add to index variable]
!!VRy10&y3=1:S593 +y11; [new index number]
!!VRvy10&y3=1:C63/27/0/-1/0/0/0; [Mitrill smelther Shrine]
!!FU671&y20>0:P63/22/0/y20/50; [replace 50% of FORGOTTEN SHRINE]
I have replaced some of the Forgotten Shrines (50%) by the Mithrill Smelter. So I tried to use the same command to substitute the old learning stones by the new one:
!!VRy20:S0; [initialize object counter to 0]
!!UN60/?y3; [check if Forgotten Shrine script is enabled]
!!UN149/?y4; check if mithril enhancements is enabled
!!VRy3|y21=0/y4<>1:S0; [set y3 to 0 if Replace Objects or mithril enhancements aren't enabled]
!!VRy20&y3=1:+1; [add one to object counter]
!!VRy11&y3=1:Sy20 *7; [number to add to index variable]
!!VRy10&y3=1:S593 +y11; [new index number]
!!VRvy10&y3=1:C100/3/0/-1/0/0/0; [new learning stone]
!!FU671&y20>0:P100/-1/0/y20/50; [replace 50% of old learning stone]
But it didn't work. The place becomes empty. The only explanation is that the new learning stone is not object 100/ subtype 3. But at the map editor it says it is.
What should I do?
____________
|
|
Bersy
Honorable
Supreme Hero
|
posted November 07, 2012 04:45 PM |
|
|
Possibly the problem is that zobjts.txt has no records about new objects.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted November 07, 2012 04:46 PM |
|
|
All new object patches will work only via editor and in custom mods. You can't place new subtypes with erm.
____________
Era II mods and utilities
|
|
Felipe
Known Hero
Editing Heroes Without Limits
|
posted November 07, 2012 04:50 PM |
|
|
Noooo....
http://www.youtube.com/watch?v=WWaLxFIVX1s
____________
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted November 07, 2012 04:55 PM |
|
|
The game will recognize any new subtype when visited, is only about creating them in wogification process. To enable new types/subtypes, one should do same work as Slava when improving type 63, no idea how he did.
I had this problem when creating 8 additional tents, border gates and monoliths 2 ways for Tew 4. Just giving them different subtype did not work, had to find a way around.
@Bersy, never tried to modify zobjts. Could it be possible to enable new subtypes in?
____________
Era II mods and utilities
|
|
JimV
Responsible
Supreme Hero
|
posted November 07, 2012 06:46 PM |
|
|
Work-around for custom-scripted objects: place an object which looks like a different object. Example from "Hidden Spells" (aka "Swords of Night and Day II - The Ice King"):
!!UN:I102/27/1/158/0/141/0;
This places a swamp volcano (158/0) but uses the DEF for a new object (Lost Temple of Earth) which I assigned to 141/0 in three files: ZEOBJCTS.TXT, ZAOBJCTS.TXT, and ZOBJCTS.TXT (but was still not able to place the object directly). Other work is needed to reset the hint text, which I will skip.
It occurs to me that if I if did something similar with a new Learning Stone, then set the trigger square to the new type/subtype with OB:T and OB:U (e.g., OB:T141 U0 for the above example, not that that would do anything for that example), and set the control word (OB:C) appropriately (that last step would not be necessary if the placed object - 158/0 in the above example - was of the same type, e.g. the old Learning Stone), then perhaps the net effect would be the same as having the ability to place the new (141/0, in my case) object directly - but I have not tried this, I am just saying it seems worth a try. (Use at your own risk, no warranty implied.)
|
|
Siegfried
Famous Hero
|
posted December 07, 2012 09:04 AM |
|
|
Interesting. For me setting new subtypes worked. It's just that i had to alter the subtypes in all ZAOBJTS, ZEOBJTS and ZOBJCTS the same way. I renumbered the subtypes of all the "special terrain patches" to allow a hero to place a specific one after a won battle. It worked out of the box.
In fact i want to add "new" objects by using the grotto defs and add them as new subtypes of the subterranean gate. These fit much better into the map than the original ones.
|
|
JimV
Responsible
Supreme Hero
|
posted December 07, 2012 02:51 PM |
|
Edited by JimV at 15:39, 07 Dec 2012.
|
Further to Seigfried's comment, when I first tried to place objects via ERM, in the old "Stargate Atlantis" map (not to be confused with the much better "Stargate Atlantis Rising" map), I found that many standard objects (of subtype zero) would cause the game to crash if I tried to place them. These object types are listed in the updated ERM Help. Since then I have found that new, non-standard objects can be placed, as long as they have unique type/subtype numbers, or depending on their position in the ZxxxTS.txt files if not. I have not checked to see if the standard types which cause crashes are missing from some of the ZxxxTS files (but it would be surprising since they are old, standard Heroes 3 objects).
Placing an object which does not show in the game could be due to missing .msk and .msg files in H3sprite.lod, of course. (In fact, in "Ice Arrow" there is an invisible town which can be entered, but that uses a slightly different method.)
Also, I am suspicious of the P100/-1 parameters at the end of the OP's script, but have not tested this. (Why not P100/3? Perhaps irrelevant, but suspicious.)
Edit - no, sorry, the P100/-1 is fine. It was a bit early in my personal time zone. My guess is that Bersy was right (as per The Bersy Rule).
Aside to Felipe and Seigfried - Kivo is looking for scripters to help finish the "Succession Wars" mod. It might be an interesting way to continue developing and make some contacts who would also help with your projects. See the Succession Wars thread.
|
|
Felipe
Known Hero
Editing Heroes Without Limits
|
posted December 12, 2012 06:18 PM |
|
|
Quote: Possibly the problem is that zobjts.txt has no records about new objects.
It worked, but it have another problem. If I change three existing learning stones by new ones, when the a hero visit any of them all the others became visited too.
The same problem happen with dragon utopias. If I place two new dragon utopias and a Hero win one of them the other stay visited too.
If I change a scholar all the new scholars will give the same bonus etc...
I haven't try to correct this bug yet. I am just reporting.
____________
|
|
JimV
Responsible
Supreme Hero
|
posted December 12, 2012 09:57 PM |
|
|
My guess is that they all have the same object number. (This issue is mentioned in ERM Help at the bottom of the UN section.) For some objects (not all), the object number is the OB:C? value. Try checking and changing these values, for the objects.
|
|
majaczek
Supreme Hero
Work at Magic Dimmension
|
posted December 13, 2012 08:51 AM |
|
|
Same, happenned with wogmod by doom3d (he replaced some objects during wogification with level trees). I investigated the problem and with the help of erm help I know all learning stones, all level trees, all mills etc. have an unique number which is used to check if hero visited it. Placed objects have to be corrected or it will be 0 (all placed objects would share same id - horrible).
It may be mentioned OB:C number but under OB in erm help is receiver specific to learning stones (and bunch of other tiny receivers for specific objects).
The number the visit id can be is limited, so if I remember no more than 48 unique learning stones can be on one map (but there ie. Can be 96 ones with each being doubled). If you replace learning stones with learning stones it's trivial as scanning the number from old and restore it on placed. If you want do it with replacing other objects you probably need to scan all learning stones and find unused visit ID (or ugly solution would be numbering from max downwards, but it's prone to doubles).
|
|
|