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 4 - Lands of Axeoth > Thread: Editor trick
Thread: Editor trick This thread is 3 pages long: 1 2 3 · «PREV
IamNotHelping
IamNotHelping


Hired Hero
posted July 05, 2021 01:54 AM
Edited by IamNotHelping at 04:06, 05 Jul 2021.

iliveinabox05 said:
Fear not, I have already scripted a way to display the value of different variables!

You're on the right track, you can use the resource panel to show these values.



Seems like I still have issues installing Java but nvm.
I had already made the 30 level if else tree so in itself I can already directly display in a message at the begining of every turn how much of those ressources i have.

I was thinking I could have an army under the mountain where the quantity of some creatures in its troops correspond to the number of ressources I have. This way I am able to easily look at how much ressources I have at any time.

Edit: It works!
I have peasants representing the amount of Foof and Water Elementals representing the amount of Water I have. I need another Good looking creature for the Icon and making sure the army with all those events doesn't die when those ressources reach 0.
The only downside is that it reduces by 1 the number of armies you have. However I had always been a Hero>Armies guy so idc much about it.


____________

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

Tavern Dweller
posted July 05, 2021 12:20 PM

iliveinabox05 said:
Oh, and it looks like if you're using Equilibris, you can use syntax like this in display events to show you the value of a variable:

($(tarnumNewPoints))

Where "tarnumNewPoints" is the name of a numeric variable. Shouldn't need the outside parentheses, I may have just put that to make the number easier to see within the text. I also don't think I've actually tested it out, but I don't think I would have scripted it if it wasn't known to work!

Nice! If this works then it will really make things easier. Would this only work if you use the equilibris campaign editor when making the map or is it enough to just play the map with heroes 4 equilibris? I'll probably test this soon myself. Not sure if I can be bothered to go back and edit my maps to just use this though.

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


Hired Hero
posted July 05, 2021 02:44 PM

Is there a way to stop a specific unit to get off a ship?
In my case it would be pirates.

In the begining of the scenario my hero and its army (contains pirates) are on a ship, they eventually land on an island and the story progress.
The problem is a few days later I would need an event to happen on that ship. If when they landed they used the eazy way (right click) rather than splitting the army so that the ship can continue picking up ressources on the sea, then the army that keeps all the events would be the one with the hero. So I can't have the event I need happen on the ship.
Easiest way would be to tell the player to be smart and keep some pirates on the ship but counting on the player to not make mistake seems like bad scripting to me.


(Btw how does bombing works? Is it possible to bomb a ship, if yes the bomb needs to be on the ship at the begining or where the ship would be when it explodes?)
____________

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


Responsible
Legendary Hero
Modding the Unmoddable
posted July 05, 2021 07:52 PM

Bombing won't work with ships AFAIK only pre placed objects and only some of them (you can't bomb towns for example)

As for the pirates, I reccommend creating a gate on ground that tells you "pirates can't pass". Create negative prerequisite "army does NOT contain pirates" for the toll/quest gate.
____________
Never changing = never improving

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


Honorable
Famous Hero
posted July 05, 2021 09:32 PM
Edited by iliveinabox05 at 21:34, 05 Jul 2021.

zense said:
Nice! If this works then it will really make things easier. Would this only work if you use the equilibris campaign editor when making the map or is it enough to just play the map with heroes 4 equilibris? I'll probably test this soon myself. Not sure if I can be bothered to go back and edit my maps to just use this though.


Doesn't matter which editor you do it in. When you play the map using WoW, you will just see the name of the variable typed out. If playing in Equi, then you should see the value instead.

As far as bombing adventure objects, I think the consensus is that if it can hold units, you can't bomb it. Might be other exceptions of course.

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

Tavern Dweller
posted July 06, 2021 12:00 AM
Edited by zense at 02:07, 06 Jul 2021.

Actually I recently made a map where I bomb a ship but basically you can only bomb a ship if an army has never entered it is what I found out. In my map I initially bombed a ship on day 1 if a certain player was human (because AI is stupid and needs some assistance).

So yeah in my opinion NimoStar's suggestion is the best one for your problem.

Also I just finished testing the $(valueName) and it works perfectly. I was able to use it in everything from display message, ask question to quest log, and this means the quest log will update according to quest progression. It's pretty nice and I wish I knew it earlier. And yeah I found out you don't need to do it through the equilibris editor, which has a tendency to crash on my side whenever I scroll down certain object categories.

The only weird thing I noticed is that any message that uses $(valueName) does not end with a punctuation. I didn't test it extensively but if I wrote a message like "I have $(numberOfHats) on my head." Then it would become "I have 10 hats on my head" without the punctuation. It's not something I will lose sleep over but I thought I should mention it. I could try to see what happens if I add another punctuation.

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


Honorable
Famous Hero
posted July 06, 2021 12:05 AM
Edited by iliveinabox05 at 00:12, 06 Jul 2021.

zense said:
Actually I recently made a map where I bomb a ship but basically you can only bomb a ship if an army has never entered it is what I found out. In my map I initially bombed a ship on day 1 if a certain player was human (because AI is stupid and needs some assitance).


Ah interesting. I wonder if that also works with garrisons?

zense said:
Also I just finished testing the $(valueName) and it works perfectly. I was able to use it in everything from display message, ask question to quest log, and this means the quest log will update according to progress. It's pretty nice and I wish I knew it earlier. And yeah I found out you don't need to do it through the equilibris editor, which has a tendency to crash on my side whenever I scroll down certain object categories.

The only weird thing I noticed is that any message that uses $(valueName) does not end with a punctuation. I didn't test it extensively but if I wrote a message like "I have $(numberOfHats) on my head." Then it would become "I have 10 hats on my head" without the punctuation. It's not something I wilø lose sleep over but I thought I should mention it. I could try to see what happens if I add another punctuation.


For the missing period, try escaping it with a backslash "I have $(numberOfHats) on my head\." and see if that brings it back.

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


Honorable
Famous Hero
posted July 06, 2021 12:10 AM
Edited by iliveinabox05 at 00:11, 06 Jul 2021.

Somehow double posted.

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


Responsible
Supreme Hero
posted July 06, 2021 12:35 AM

The Equi display variable does work, would have mentioned it but your guys beat to me all the good advices lol
And as stated multiple times, triggered script is the way to go.
____________

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


Responsible
Supreme Hero
posted July 06, 2021 12:42 AM
Edited by karmakeld at 00:45, 06 Jul 2021.

zense said:


Also I just finished testing the $(valueName) and it works perfectly. I was able to use it in everything from display message, ask question to quest log, and this means the quest log will update according to progress. It's pretty nice and I wish I knew it earlier. And yeah I found out you don't need to do it through the equilibris editor, which has a tendency to crash on my side whenever I scroll down certain object categories.

The only weird thing I noticed is that any message that uses $(valueName) does not end with a punctuation. I didn't test it extensively but if I wrote a message like "I have $(numberOfHats) on my head." Then it would become "I have 10 hats on my head" without the punctuation. It's not something I wilø lose sleep over but I thought I should mention it. I could try to see what happens if I add another punctuation.



To fix the editor issue of crashing, you need to reset/delete the equi.AOP in the Data folder (I think, something aop). You have a bad object listed in one of the editor tabs, this is why it always crashes when you try to scroll down. Just delete it and open the editor again.

Oh and is that an 'Ø' I noticed
____________

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

Tavern Dweller
posted July 06, 2021 01:14 AM
Edited by zense at 02:10, 06 Jul 2021.

@iLive
I'll try that backslash way.


karmakeld said:


To fix the editor issue of crashing, you need to reset/delete the equi.AOP in the Data folder (I think, something aop). You have a bad object listed in one of the editor tabs, this is why it always crashes when you try to scroll down. Just delete it and open the editor again.


I tried the equi editor on a "clean" wow 3.0 equi install and it happened. I should probably give it another try but so far I haven't needed it.
karmakeld said:

Oh and is that an 'Ø' I noticed

Øøh not sure what you're talking about?

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


Hired Hero
posted July 06, 2021 01:54 AM

NimoStar said:
Bombing won't work with ships AFAIK only pre placed objects and only some of them (you can't bomb towns for example)

As for the pirates, I reccommend creating a gate on ground that tells you "pirates can't pass". Create negative prerequisite "army does NOT contain pirates" for the toll/quest gate.


I see, then I think I'll have to stick to displaying a message, since the starting point is in the ocean which can have land on too many places, it wouldn't look good to add gates and obstacle at too many places.

I asked the one who is gonna play the game and he told me he would manage to split up the troops for landing if a message reminded him.

Thanks for taking the time to reply me.
____________

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

Page compiled in 0.0399 seconds