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: Distance between 2 moving objects.
Thread: Distance between 2 moving objects. This thread is 2 pages long: 1 2 · «PREV
IamNotHelping
IamNotHelping


Hired Hero
posted July 15, 2021 07:04 AM

karmakeld said:
I'm thinking it would be possible to set up and encountered/vicotorious script where you check the amount of creatures your enemy has upon encounter and when you're victorious. If not the number on the victorious script is less than the encountered, this would suggest the number is equal and thus they've fleed.
It would take some time to script, but I have a similar 'check creature amount' script that could easily be adjusted and copy/pasted with the H4MG tool. That would be my suggestion, beyond the solutions already posted. Can't guarantee it'll work, but you shouls try it out with an easy test setup.


You āre right!
Thanks so much, I had completely forgot that conditions like "total number of creatures in army" could target the oposing side. Since what i want to know is if they fled at encounter, i dont even need to do some scripting at encounter for counting number of enemy.
____________

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


Responsible
Legendary Hero
Modding the Unmoddable
posted July 15, 2021 10:03 AM

Quote:
If not the number on the victorious script is less than the encountered, this would suggest the number is equal and thus they've fleed.


I don't think this is OK.

Charm and Diplomacy will diminish the number of enemies even if they don't flee.
____________
Never changing = never improving

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


Hired Hero
posted July 15, 2021 11:35 AM

NimoStar said:
Quote:
If not the number on the victorious script is less than the encountered, this would suggest the number is equal and thus they've fleed.


I don't think this is OK.

Charm and Diplomacy will diminish the number of enemies even if they don't flee.


Idk if I lagged coz I replied to it a bit earlier so sry if you see me reposting it

I am only checking if the enemy army still has creatures
Total number of creatures =0. If they flee at encounter it doesnt change their amount of creatures, at least for wild armies.
____________

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


Responsible
Legendary Hero
Modding the Unmoddable
posted July 15, 2021 05:55 PM
Edited by NimoStar at 17:56, 15 Jul 2021.

Ok, greater than 0 should do the trick. I replied that because it was said just "Less than the encountered". Which means a lower amount of defeated creatures would trigger that even if they didn't flee.

PS: Though also, Equilibris grandmaster diplomacy reaches 100% conversion I think? That would require testing.
____________
Never changing = never improving

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


Responsible
Legendary Hero
Modding the Unmoddable
posted July 19, 2021 07:34 PM

I had a new idea to make a  JRPG-similar encounter system, based on the convoluted "AI vision" scripts.

Fill the map with roving heroes with Grandmaster Stealth and a random assortment of other skills. They will encounter your hero fairly randomly while walking through the map and you won't see them coming normally.

Furthermore altering this, you could have Cloak of Distraction to ignore their threat area, only being attacked with precision.

"but there is more than just heroes, what if I want to be attacked by creatures? They would not be invisible!"

Well that's where you are wrong, kiddo - Make a script that gives creatures to the enemy heroes, but only when encountered. You could program this to be random creatures with any number of conditionals, too! For example, 1 level-1 stack by default, 1 extra level-2 stack when "enemy" (you) hast a level 5 hero, 1 additional extra stack if enemy has level 10 hero... a level 4 stack for level 25 hero, and so on. Or with any other condition, really.
____________
Never changing = never improving

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


Honorable
Famous Hero
posted July 19, 2021 11:48 PM

NimoStar said:
I had a new idea to make a  JRPG-similar encounter system, based on the convoluted "AI vision" scripts.

Fill the map with roving heroes with Grandmaster Stealth and a random assortment of other skills. They will encounter your hero fairly randomly while walking through the map and you won't see them coming normally.

Furthermore altering this, you could have Cloak of Distraction to ignore their threat area, only being attacked with precision.

"but there is more than just heroes, what if I want to be attacked by creatures? They would not be invisible!"

Well that's where you are wrong, kiddo - Make a script that gives creatures to the enemy heroes, but only when encountered. You could program this to be random creatures with any number of conditionals, too! For example, 1 level-1 stack by default, 1 extra level-2 stack when "enemy" (you) hast a level 5 hero, 1 additional extra stack if enemy has level 10 hero... a level 4 stack for level 25 hero, and so on. Or with any other condition, really.


The random battle system I implemented for my Reckoning campaign maps was actually inspired by Final Fantasy 6. I did tweak it a little bit so that it was a random number of steps you have to take before a battle triggered, rather than a flat percent chance on each step. Easier to control that way.

I do wish we could have heroes in triggered battles, as that would add so much more flavor to the random battles.

I tried adding a hero to a triggered battle using the Advanced Options Editor, but nothing happened. The game didn't crash, but the hero wasn't in the battle.

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


Hired Hero
posted July 22, 2021 02:50 AM
Edited by IamNotHelping at 03:42, 22 Jul 2021.

NimoStar said:
Last placed is good news. It means mapmaker has control instead of it being hardcoded.


I've realized an issue with last placed.
An army entering a town, splitting,etd loses its priority. We often put the events in the hero so that it resist disparition, however a hero's event only happens after the army/town he is in took effect.

Ima check if capturing a town also changes its priority or not.

If it does than the mapmaker have no real control of the order of events, a hard coded would need more learning but could provide a sure order.

Edit: the priority of buildings isn't affected by changing owners. Which is a good news, the only thing that changes is for armies and and heroes if they are split/enter a building.

Then its still possible to more or less keep a control of the order of events.
____________

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

Page compiled in 0.0328 seconds