|
Thread: Distance between 2 moving objects. | This thread is pages long: 1 2 · «PREV |
|
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.
____________
|
|
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.
____________
|
|
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.
____________
|
|
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.
____________
|
|
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.
____________
|
|
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.
|
|
IamNotHelping
Hired Hero
|
posted July 22, 2021 02:50 AM |
|
|
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.
____________
|
|
|
|