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 5 - Modders Workshop > Thread: Town Portal Mod
Thread: Town Portal Mod
frostymuaddib
frostymuaddib


Promising
Supreme Hero
育碧是白痴
posted February 17, 2013 07:11 PM bonus applied by Galaad on 04 Aug 2017.

Town Portal Mod

Town Portal Mod

Hello everyone.

This is my first mod, and it is using lua scripting to add 'new' Town Portal spell that allows to choose your destination. It was realised using Custom Ability #4 that can be controlled with lua.

Spell requires Advanced Summoning Magic and can be learned in some of the map's towns. Unfortunately, I haven't found a way to make spell appear in Mage Guild, so in this first version you cannot see in which town has spell. (Ideas for this issue are welcome. )

Requirements: Heroes of Might and Magic V - Tribes of the East v3.1. Also works with current version of Quantomas' AdvAI mod

I have tested this mod in single player and hot-seat only, and I don't know how will it behave in other setups. Also, in order to use this mod in multiplayer games (hot-seat) map must have script file in it. I included in this mod parts of PROME7HEUS' Reanimation mod (mod that add's this files to standard multiplayer maps and tool that is adding this change to a selected map file) because of similar requirements in that mod. Be sure to check Reanimation mod.

Installation: Just place *.h5u from archive to your UserMODs folder.

Known issues:
- When there are units in town's garrison (without a hero), teleporting hero will be placed 'over' them. Removing that hero from garrison will allow units to appear
- Hero cannot use this spell while he is in town.

DOWNLOAD

All constructive suggestions are welcome . This is my first mod, so I hope you will find it fun.

Some screenshots:





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


Famous Hero
posted February 17, 2013 08:24 PM

Quote:
Unfortunately, I haven't found a way to make spell appear in Mage Guild, so in this first version you cannot see in which town has spell. (Ideas for this issue are welcome. )


Try to get into map properties (manually) and to add line with script name of the spell to list of available spells in town properties. Difficult but... I think it should work.

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


Known Hero
posted March 25, 2013 03:06 AM

Very nice find, usually I avoid capturing a town if my main town isn't well guarded, I will have to try this out (though i'm concerned the A.I might not be able to take advantage of the mod)

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


Famous Hero
posted March 25, 2013 07:29 AM

Hem, it would be difficult if we have 12 towns ;P

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


Honorable
Undefeatable Hero
of Gold Dragons
posted March 25, 2013 08:58 AM
Edited by alcibiades at 08:59, 25 Mar 2013.

Wow, for me this is like the Holy Grail in making Heroes 5 perfect. Shouldn't this spell be an Adventure Magic spell rather than Summoning Magic?
____________
What will happen now?

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


Known Hero
posted March 27, 2013 02:53 AM

Agree with Alcibiades's suggestion.

Make this an adventure spell, req level 10 to learn, any heroes* with that level can learn it automatically from any level 2 Mage Guilds.

*except Stronghold heroes. They should learn it when buying one of the talismans.

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


Famous Hero
posted March 27, 2013 09:56 AM

Would be too strong

Better if requires 25 level xP

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


Known Hero
posted April 01, 2013 04:45 AM
Edited by rpgyay at 22:52, 01 Apr 2013.

Well I double checked and it looks like it is an adventure spell but so far i'm not able to learn this spell automatically by making it level 0 and with a requirement of level 0, I already patched the map so i'm not sure if I will only learn the spell when I get another town?

Edit: After looking at the scripting I was able to get this working without needing advanced summoning, thanks again for this mod.

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


Adventuring Hero
posted April 01, 2013 08:27 AM

@frostymuaddib - really great idea of mod

Quote:
Would be too strong

Better if requires 25 level xP


Definitely - 25 level would be appropriate


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


Known Hero
posted April 03, 2013 07:37 PM

One suggestion is to make a separate mod so that people don't have to edit that would give you a 100% of learning the spell at a town (nothing worse then having bad luck and not getting the spell at your starting town then conquering another town and still not getting the spell) and of course remove the advanced summoning requirement.

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


Known Hero
posted April 06, 2013 06:35 PM
Edited by rpgyay at 18:40, 06 Apr 2013.

Even trying to edit the script I noticed that some of my heroes didn't retain the spell, even going to different towns, so i'm not quite sure what's wrong since I don't really do scripting anyways another bug is that when you cast the new Town Portal it doesn't take away from your movement (leading to potential abuse by ambushing the A.I or other players who might get too close to your towns).


Edit: On another note it seems that you would need to add a level requirement in the script not with the custom4.xdb since it ignores the level requirement.

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


Famous Hero
posted April 07, 2013 08:15 AM

Maybe use ChangeHeroStat function?

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


Known Hero
posted April 07, 2013 07:27 PM

I was just giving FrostyMuadDib some feedback, like I said I don't really know scripting otherwise I would try to correct it myself.

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


Known Hero
posted April 12, 2013 01:05 AM

It looks like this may only work during the first day or so, I get the spell with first hero then I leave the town and recruit another hero and  I get the spell (if hero is in same town you don't get spell) but after that no other heroes seem to get the spell, I've tried moving around to different towns in hopes of getting the spell but with no luck.

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

Tavern Dweller
posted March 28, 2017 02:29 PM

rpgyay said:
Edit: After looking at the scripting I was able to get this working without needing advanced summoning, thanks again for this mod.

Really want this mod without summoning ^_^
P.S. Lvl 25-30 requirement is nice, but summoning, common... I am already using 8 skills instead of 6.

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


Known Hero
posted April 06, 2017 06:37 AM
Edited by rpgyay at 06:39, 06 Apr 2017.

Sorry it's been so long that I lost my modified version, but I believe I just tinkered around with the file "MyTownPortal.lua" and if you look at:

if herojiSaMagijom[herojiIgraca]~=1 and GetHeroSkillMastery(herojiIgraca,SKILL_SUMMONING_MAGIC)>=2

This dictates the prerequisite and you should be able to modify it to:

if herojiSaMagijom[herojiIgraca]~=1

Hopefully, this can help you, I haven't experimented with this to see if that works.

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

Tavern Dweller
posted May 03, 2017 04:44 PM

rpgyay said:
"MyTownPortal.lua":GetHeroSkillMastery(herojiIgraca,SKILL_SUMMONING_MAGIC)>=2


Thanks a lot for advice, I've unpacked .h5u and found .lua file and changed it in notepad.
Unfortunately, I was not able to get the spell yet, though I had many towns, scripts were enabled, and other mods worked fine. Will keep testing...

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


Known Hero
posted May 05, 2017 06:40 PM

It probably will take a little experimenting to get it working, I see  other things you could try altering like:

heavenProb=63;
sylvanProb=50;
academyProb=37;
dungeonProb=45;
necropolisProb=37;
infernoProb=50;
fortressProb=55;
strongholdProb=70;

If you change to 100 or 99 then that should increase your odds of getting the spell.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread »
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0405 seconds