Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 3.5 - WoG and Beyond > Thread: Simple Way to Add New Towns Under Era 2.3 (Dragon Peaks example)
Thread: Simple Way to Add New Towns Under Era 2.3 (Dragon Peaks example) This thread is 4 pages long: 1 2 3 4 · «PREV / NEXT»
OxFEA
OxFEA


Promising
Famous Hero
feanor on DF2.ru
posted July 04, 2012 11:02 AM

Quote:
We can't have angels on one side and angels using another def on the other side, can we?

We can, but not via redirections and I'm not sure that it will safe.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
JimV
JimV


Responsible
Supreme Hero
posted July 04, 2012 03:04 PM
Edited by JimV at 15:47, 04 Jul 2012.

Thanks for the save, and those are good points.

The more DEF's that need to be redirected, the longer and more complicated the ERM script will be.  Also there will be more and more situations which have to be prevented (such as viewing a Rampart Town from a Dragon Peak within the Town Screen).  So at some point this method will probably become impractical.

Such challenges can be interesting to work on, though.  Having standard Angels from standard Castles fight bizzaro Angels from bizzaro Castles (or good Spocks without beards fight evil Spocks with beards, to use a Star Trek reference) could be one such.  Rather than redirecting the Angel or Spock DEF, I think I would use OxFea's method to add new creatures, and juggle the creature types between Towns.  (Enter a standard Castle, get standard creatures; enter a bizzaro Castle, get new bizzaro creatures.)

The main limiting and complicating factor is the lack of good triggers for all AI actions, I think.  Human players can be almost completely controlled, but many AI actions have no ERM triggers.

Darn, nothing happens on my system when Jaegar enters Dragon Peak 6 and I move the mouse pointer all over the Town Screen.  I was hoping there was some combination of WoG options which caused the glitch, and that combination would be stored in the saved game.  It seems there is some system difference which is not stored in the saved game.  I will dig out my old XP computer and try to saved game on that system (guess: nothing will happen there either, as I can't think of a mechanism involving XP vs. W7).  I will also stare at the Mysticism script which produces your message.

The Dragon Peak is set so that a Mage Guild cannot be built, so as a last resort I can modify the Mysticism script to check for this condition.  (I am a bit surprised that it does not already have this check.)

Thanks a lot for the unpaid play-testing.  Having good play-testers is essential to making a good mod, I think.

Update - as usual, I misunderstood what you were saying about the Mage Guild.  It does happen on my system, provided I right-click.  I consider this a flaw in the Mysticism script rather than a new error which I introduced - it will happen in any Town, whether that Town can build a Mage Guild or not (provided the Mysticism option is enabled).  It can be fixed by changing the Mysticism script.  I will include a revised "43 wog - mysticism skill enhancement.erm" in my next update.  I am not sure when that update will be, due to other (non-Heroes) factors, but probably within a week's time.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
master_learn
master_learn


Legendary Hero
walking to the library
posted July 04, 2012 03:59 PM
Edited by master_learn at 16:03, 04 Jul 2012.

JimV,I started your Dragon Peaks Test map(M sized).
When I visited with Sorsha(she has the misticism at expert)my Dragon town(the very 1st day),I clicked with the RIGHT button on several points of the town screen and received the same message Salamandre gave screen for.
First point I clicked was below one of the dragons,but the message appear when clicking over them or some other points.

Edit:When I posted I didnt see your last edit-seems a little bit late info from me,but anyway,if some more info I get,will write it down.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
JimV
JimV


Responsible
Supreme Hero
posted July 04, 2012 04:56 PM

Thanks for the help anyway, master_learn.

There does not seem to be a direct ERM command to check whether a Town building is enabled or disabled, so the only easy thing to do is to prevent the Mysticism message (z135016) when a Town has no Mage Guild.  This removes a legitimate use of the Mysticism script in the case that a Town has no Mage Guild but the MG is not disabled, so this cure may be worse than the disease.  I have uploaded a revised Mysticism script with this change to the Box.net URL (given in the first post) for now, but a better long-term solution is needed.

Current alternatives:

1) Don't right-click where the Mage Guild would be in a Town which has Mage Guilds disabled.

2) Do right-click, but consider that the information is hypothetical only in the case of a Dragon Peak, since dragons will not allow a Mage Guild to be built on one of their mountains.

3) Download the revised script into Mods/WoG/Data/s and accept the fact that the Mysticism skill will not reveal future Mage Guild spells until at least a level-one MG has been built.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Salamandre
Salamandre


Admirable
Omnipresent Hero
Wog refugee
posted July 04, 2012 05:12 PM

I did not find the mysticism thing annoying, just reported. If it stays, there is not much of a problem.

About the mod, I guess that Bersy wanted to point to command line about installing the mod, without which it could bug. The install should come as solid archive and with  the command Tools\installmod.exe "Mymodname". At least, thats how all ERA mods have been released until now. But I don't know much about those mechanics.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
JimV
JimV


Responsible
Supreme Hero
posted July 04, 2012 05:39 PM
Edited by JimV at 18:05, 04 Jul 2012.

My knowledge of how Era mods are structured comes from the "Era II" manual, which I will paste below so people will know what I am referring to.  I have followed this structure in building a mod - necessarily, I think, since before a mod is developed it cannot be packaged - and at the end, when I have a mod that works, I put it in a zip file.  I have used the zip file to transfer a mod from one machine to another, and so far that has worked.  (And players have downloaded "The King In Yellow" zip package and played it successfully.)  I have played Bersy's avi tutorial four or five times, but it goes too fast for me to follow it well.  I know Bersy does something different and better, but I have not yet found instructions which I can follow to work the same magic - but that's why Bersy makes the big bucks (or should) and I don't.

All of which is a bad excuse for laziness on my part.

Mods concept.
Mod is a set of files and folders, including graphics, audio, video, scripts, plugins, patches and custom files. Era introduces "Mods" folder where each folder is called a mod and treated as game root directory. It means that files and folders in mods should be arranged in the same way as in the root directory.

Original: Data
Mod: Mods\My Mod Name\Data

Mod contents.
The contents of mods is not supposed to be modified at run-time. All files which are subjects to be modified at run-time (like settings, logs, temporary files) should be placed in real game folders during installation. Several mods can exist in Mods folder at the same time providing they are compatible. Every mod can have unlimited number of in-game resources (snd/vid/pac archives in Data) which will be automatically loaded.

Priorities.
If any mod has file with the same name as in original game, the file from mod is used instead of original one. If several mods have file with the same name, then mod with the highest priority is used. To assign a priority to a mod, add a number to the beginning of it's name, separated from the rest text by space(s). The higher number is, the higher the priority is. Example: "100 MyMod". If no priority is specified, it's assumed to be 0. In case of equal priority, the creation time of mods folders is checked and the most recent folder is preferred during file search. This mechanism guarantees that mods installed later will have priority over older ones.

P.S. I am not thinking well today.  I should have modified the Mysticism script as I first proposed - make a special case for Dragon Peaks, based on the Town name.  However, I have only about three hours of free time left today, and need to get some exercise, so I think I will go off-line for the next day or so.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Bersy
Bersy


Honorable
Supreme Hero
posted July 04, 2012 07:30 PM

Sorry, Jim. The video was just a variant of real life conversion, not step-by-step tutorial, thus useless. I will try to make smaller tutorials with text and screenshots in the future.

You did all right. The problem is with mods priorities (or order). The only way to really install mod (to give it top-most order or priority) is to execute installmod.exe "modname". Thus all mods I make are self-extracting rar archives (using winrar) with setting: run after unpacking: Tools\installmod.exe "modname".

WoG
Yona
...
NewMod

not:

WoG
NewMod
Yona
or anything like that.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
JimV
JimV


Responsible
Supreme Hero
posted July 04, 2012 09:17 PM

Thanks, Bersy.  I did learn some things from watching the video.  It was not useless, just not completely understandable to me.

I went for a walk and as usual once I am away from a computer, I had a few ideas, so I have made a final update for today to the Box.net files.  The ERM Mysticism script now has a special case for Dragon Peaks, and I think this glitch was my fault after all.  I noticed in "Hint Test" that the Castle does not trigger the Mysticism message before a level-one Mage Guild is built, but the Dragon Peak does.  I am now guessing that my script which demolishes and disables all buildings except the Town Hall and Dragon "dwellings" somehow fools the ERM commands used to check Mage Guilds in the Mysticism script (so another great catch by Salamandre).  Anyway, it won't happen with the revised 43 wog script.

I also thought about all the spell scrolls which litter a random map, and how after I have a couple of Mage Guilds I don't even bother to pick them up, so I added an option to the DragonPeaks script to get rid of half of the spell scrolls.  This enables the script to squeeze a couple more randomly-placed Dragon Peaks into the sample random map.

There are still many larger issues I need to address, as mentioned before (e.g., Kingdom Overview, Summoning Stones), but it will be a few days before I have time to do development and testing on them.  Meanwhile, I would be grateful to hear of any problems or suggestions.

A final thought on redirects.  I am not sure why we got into a discussion of using them on creature DEF's.  I did not do that in this mod and don't recommend it.  There is already a method (OxFea's method) posted on this forum for adding new creatures without replacing existing creatures.  My idea, for what it is worth, was to add another Town without replacing an existing Town, by redirecting the Town DEF's on entry.  If the new Town has new creatures, they should be added by OxFea's method (and assigned to the new town on entry, as the dragons are in this mod).

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Salamandre
Salamandre


Admirable
Omnipresent Hero
Wog refugee
posted July 05, 2012 07:41 AM

The discussion went into creatures defs because they are the core of a new town, besides the technical add. Modders create new towns because they want a new playable faction, means 14 creature to replace or create. Even if amethyst can virtually help on that, there are other issues which are unsolvable atm, as dwellings on map, new heroes, editor limitations and AI handling. So far, the safe way is replacing an existing town, but any quality experiment like this one is, of course, priceless.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Bersy
Bersy


Honorable
Supreme Hero
posted July 05, 2012 10:09 AM

We could try to turn Kegolo's work into a template some day.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
master_learn
master_learn


Legendary Hero
walking to the library
posted July 05, 2012 09:19 PM

JimV,in your M sized test map I noticed that Titans and Diamond Dragons have lower speed than usual.
And also this morale explanation:



I doubt it has anything to do yet with the dragons from the new city.
In a couple of game days I think to engage the 4 city dragons in battle with ogres.

I suppose the play testing is aimed at variety of situations,so to be more helpful I may try the XL one.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
master_learn
master_learn


Legendary Hero
walking to the library
posted July 05, 2012 09:39 PM

Also,when a hero enters the town and stays in that position,I exit the town only with the exit button,not hero,when I use the town shape of mouse left clicking,I see Dragon Peaks as Rampart town and I am able to buy rampart troops.
____________
"I heard the latest HD version disables playing Heroes. Please reconsider."-Salamandre

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
JimV
JimV


Responsible
Supreme Hero
posted July 06, 2012 12:23 AM

Thanks for the comments, master_learn.

I tried the "DP Test" sample map in my previous Era (2.2) folder, which does not contain the DragonPeaks mod, and got the same Morale message and creature properties.  My wild guess is that the changes are part of the Yona mod.

I am sorry but I don't think that I understand what you did in your second comment.  I assumed that you left Sorsha as a visiting or garrison Hero in Dragon Peaks 1, exited the DP1 Town Screen by clicking the Check Mark, and left-clicked the DP1 Town icon in the Town List on the Adventure Screen to re-enter the Town.  However, when I did that (with the latest DP mod under Era 2.3), what you described does not happen.  So I must have made a false assumption somewhere.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
master_learn
master_learn


Legendary Hero
walking to the library
posted July 06, 2012 01:41 AM

A screenshot:


In this position you left click the town itself and see results.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
JimV
JimV


Responsible
Supreme Hero
posted July 06, 2012 01:54 AM
Edited by JimV at 02:11, 06 Jul 2012.

Thank you, now I see what you mean.  This is another way of entering a town which will require another scriplet.

(Update) Which could look like this:


!?CM5; LMB on DP Town on Adventure map
!!CM:I?y1;
!!FU&y1<>37:E; not on Adv map
!!CM:P?v2/?v3/?v4;
!!OBv2/v3/v4:T?y2 U?y3; get type, subtype
!!FU|y2<>98/y3<>1:E; not Rampart
!!CA2:N?z3; get Town name
!!VRz2:M1/z3/0/11; get substring "Dragon Peak" if Town is a DP
!!FU6150&z2=z709/-413:P;
!!FU6151&z2<>z709/413:P;

I have not updated the download package with this addition yet because I am working on other additions.  If you want to try this one before then, copy and paste the above ERM commands at the end of the DragonPeaks.erm script in Mods/DragonPeaks/Data/s and/or at the end of the last Timed Event in "Hint Test" (since the latter is not wogified).

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
master_learn
master_learn


Legendary Hero
walking to the library
posted July 06, 2012 12:47 PM

The name of the map I gave screenshot from is Dragon Peaks test.
I added the script you wrote as a timed event and its working.

I see that clicking the button "buy all creatures" in the town I own at the start of the game suggest me a dragon for a price.

What I notice is that when I conquer a Dragon Peaks town and try to use the same button in the conquered town,it gives me possibility to buy not only the dragon for which my money is enough,but some centaurs and dwarfs.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
JimV
JimV


Responsible
Supreme Hero
posted July 06, 2012 01:40 PM

That is very interesting.  They must have been hiding in the woods at the base of the mountain.  No, but seriously I am beginning to believe that when you demolish a town building, some ERM commands behave as though the buildings were still there.  (Dragon Peak 99 was placed with the Map Editor and started the game with just the four dragon dwellings.  The DP's added on day one would have started with other buildings, which the DP script demolishes.)  I will need to revise at least the following WoG scripts, for Dragon Peaks use:

1) Summoning Stones

2) Buy All Creatures Button

3) Castle Upgrading

The current download package has the fix for clicking on a DP in the Adventure Map, and prohibits viewing Towns from the Kingdom Overview menu.

Thanks for your play-testing.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
kegolo
kegolo


Promising
Famous Hero
of infamy
posted July 06, 2012 03:57 PM

Quote:
We could try to turn Kegolo's work into a template some day.


I was actually also thinking of re-coding my town using this Redirect idea, as it sounds cool. Is it fast? Is doing what I did, the two little UN:C changes to names to have CV in them, faster than this or slower?

I was also considering making a "blank" version of my town as a replace template, but who knows what I'll end up doing

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Bersy
Bersy


Honorable
Supreme Hero
posted July 06, 2012 05:50 PM

2Kegolo:
The redirection mechanism is fast enough (binary tree). In the worst case if you redirect 1024 items, the search mechanism will compare the string of required resource to 20 possible redirection strings (not 1024 or 512). Loading resource itself will take much more time, so it's ok here.

Quote:
I was also considering making a "blank" version of my town as a replace template, but who knows what I'll end up doing

To port Hota's town in some form? ))

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
JimV
JimV


Responsible
Supreme Hero
posted July 06, 2012 07:47 PM bonus applied by angelito on 18 Jul 2012.
Edited by JimV at 18:48, 07 Jul 2012.

The final (? - well, it covers everything which has been mentioned so far) update has been uploaded.  Revisions:

1) Finally replaced blanket un-redirect with individual un-redirects.

2) Revised Map Options script (Town Renaming and Buy All Creatures) to account for Dragon Peak Towns.

3) Revised Summoning Stones script.

All the revised scripts (the above plus Enhanced Mysticism) have been added to the zip file under WoG/Data/s so that extracting everything under Mods will replace the original scripts.  The added ERM commands have "JHV" in their comments.

I will revise the first post to be consistent with the current version.

Update - nope, not final.  I have added another WoG script change to deal with a problem I had playing the random map.  On Month 2, Week 2, Day 4, I got an ERM error from the "33 wog - castle upgrades" script, coming from these lines:


!?TM82&432;
!!UN:U98/-1/?v425;
!!VRv425:-1;
!!DO867/0/v425/1:P;                    ;money increase

...


!?FU867&432;
!!CA0/x16:O?v434;

The map has 10 Towns initially, and at the start of the game I added 10 Dragon Peak Towns for a total of 20.  So v425 should be read as 20, and then reduced to 19, so that Town numbers 0 to 19 are processed in FU867.  On the subject game day, after Tan's turn, the count changed to 21 and FU867 tried to process Town number 20, which does not exist, causing the error message.  The error is not fatal, and a couple days later the count reverts to 20 instead of 21 again.

I don't know why this happens, but fixed it with this patch:

!?TM82&432;
!!UN:U98/-1/?v425; [sometimes this count is 1 too many--JHV]
!!VRv2:S-2; must initialize v2 to -1 for "next" or -2 for "prev." search--JHV
!!UN:U98/-1/-2/2; put coordinates of PREVIOUS type 98/-1 object --> (v2,v3,v4)--JHV
!!CA2:U?v5; save what should be last Town #--JHV
!!VRv2:S-1; initialize v2 to -1 for "next" search--JHV
!!VRv425:-1;
!!DO867/0/v425/1:P;                    ;money increase
...


!?FU867&432;
!!UN:U98/-1/-1/2; put coordinates of next type 98/-1 object --> (v2,v3,v4)--JHV
!!CA2:O?v434 U?y5;--JHV
!!OW:C?v433;
!!FU862&v434=v433:Px16/0;
!!VRv435: :1000 *1000;                 ;only thousands possible to add.
!!VRy1:Sx16*8 +1600;                   ;decrease non-thousands values
!!VRvy1&v434=v433:Sv435;
!!OW&v434=v433:Rv433/6/dv435;
!!VRx16&y5=v5:S99; make sure loop ends at last Town--JHV

The revised script 33 is part of the download package now.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 4 pages long: 1 2 3 4 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0674 seconds