H4 The Reckoning campaigns

The old Heroes games developed by New World Computing. Please specify which game you are referring to in your post.
User avatar
Karmakeld
CH Staff
CH Staff
Posts: 1126
Joined: 12 Nov 2011

Unread postby Karmakeld » 14 Sep 2014, 21:20

basically anything that can hold troops, CAN'T be bombed. (Towns, Garrisons and mines can't be bombed.) An important thing to remember. Only exception is abondoned mines.
Sounds interesting with the increased probabilty of combat. Don't think I've seen it before.[/b]
I'm silent in seven languages - and I got all my familys fear.
Everytime you throw dirt, you loose a little ground

User avatar
iLiVeInAbOx05
Equilibris Team
Equilibris Team
Posts: 773
Joined: 21 Jul 2014

Unread postby iLiVeInAbOx05 » 14 Sep 2014, 22:07

Karmakeld wrote:basically anything that can hold troops, CAN'T be bombed. (Towns, Garrisons and mines can't be bombed.) An important thing to remember. Only exception is abondoned mines.
Sounds interesting with the increased probabilty of combat. Don't think I've seen it before.
Dang that's kind of annoying. The scripting thing on the front page says "and towns" can be removed under the description of "Delete adventure objects." Oh well, I'll just change things up a bit. Trying to keep the player from owning towns / gold mines because gold for upgrades / etc. is supposed to come from the battles :D

User avatar
Karmakeld
CH Staff
CH Staff
Posts: 1126
Joined: 12 Nov 2011

Unread postby Karmakeld » 14 Sep 2014, 22:13

yeah the script guide also mentions something about in/decreasing hp and some other things you can't do.
you could do most of this scriptwise. you could change the town to neutral, when there's no hero there or just take away any income it might produce.
I'm silent in seven languages - and I got all my familys fear.
Everytime you throw dirt, you loose a little ground

User avatar
iLiVeInAbOx05
Equilibris Team
Equilibris Team
Posts: 773
Joined: 21 Jul 2014

Unread postby iLiVeInAbOx05 » 15 Sep 2014, 02:37

Karmakeld wrote:yeah the script guide also mentions something about in/decreasing hp and some other things you can't do.
you could do most of this scriptwise. you could change the town to neutral, when there's no hero there or just take away any income it might produce.
Yeah I was leaning toward a continuous event that reduces income based on the number of towns owned every turn. Some towns I just have set to just use the change owner script on capture so you never actually own it.

The main reason I want some towns to be available is to give spells to heroes that have learned some magic skills, but I'm thinking I may just place some of the spell conservatories around and make the player have to buy them :D

So in the end, I'll probably just use the change owner script :D

edit: I do wish there was a way to monitor a hero's health and make it so they didn't regenerate full health after each turn, but I haven't seen any scripts that I could do that with. Would be pretty cool and super RPG like, and then make the inns restore them for however much gold to stay the night :D

User avatar
Duzeom_
Conscript
Conscript
Posts: 235
Joined: 07 Mar 2011

Unread postby Duzeom_ » 15 Sep 2014, 13:52

Karmakeld wrote:basically anything that can hold troops, CAN'T be bombed.
The kingdom for the ability to delete castles! It is most annoying limitation of editor
Karmakeld wrote: Sounds interesting with the increased probabilty of combat. Don't think I've seen it before.
You have seen it in my campaign in the last but one map ;)

User avatar
Karmakeld
CH Staff
CH Staff
Posts: 1126
Joined: 12 Nov 2011

Unread postby Karmakeld » 15 Sep 2014, 14:33

ah sorry Duzeom, didn't realize those were random set scripts . Just asumed they'd always trigger combat :-)

Someone once mentioned that the use of continious scripts might slow down the game (ofcourse the more the heavier it's scripted and the more will have to run all the time). Alot can do with just timed (which can also run in AI's turn). Be aware that you don't change the town while there are troops/heroes in there.
Yeah I would have loved both to be able to bomb Towns and be able to monitor Health. But I plan on doing some tests with changing the hero to neutral, trigger a combat and then change back. Then you should be able to reduced hp, but without killing the hero.
There's also the trick using rings of Health, then take them away after fights, hero could end up with negative hp but still be alive.
I'm silent in seven languages - and I got all my familys fear.
Everytime you throw dirt, you loose a little ground

User avatar
iLiVeInAbOx05
Equilibris Team
Equilibris Team
Posts: 773
Joined: 21 Jul 2014

Unread postby iLiVeInAbOx05 » 15 Sep 2014, 14:54

Karmakeld wrote:ah sorry Duzeom, didn't realize those were random set scripts . Just asumed they'd always trigger combat :-)

Someone once mentioned that the use of continious scripts might slow down the game (ofcourse the more the heavier it's scripted and the more will have to run all the time). Alot can do with just timed (which can also run in AI's turn). Be aware that you don't change the town while there are troops/heroes in there.
Yeah I would have loved both to be able to bomb Towns and be able to monitor Health. But I plan on doing some tests with changing the hero to neutral, trigger a combat and then change back. Then you should be able to reduced hp, but without killing the hero.
There's also the trick using rings of Health, then take them away after fights, hero could end up with negative hp but still be alive.
Ah, I was thinking continuous event was just run once each day, but you can do that with timed events. So continuous events are always running, so I'll stay away from those :D

And yeah, the towns are only set to change owners when captured by the player (either while empty or with units that are supposed to be defeated first), so no units changing hands :D

Also, interesting thoughts on controlling the hero's hp. I may try to figure something out as well!

User avatar
Karmakeld
CH Staff
CH Staff
Posts: 1126
Joined: 12 Nov 2011

Unread postby Karmakeld » 18 Sep 2014, 18:55

continious always run, in the sense that they'll trigger when you interact with something (adventure object). So unless you really need it, timed is a good solution. Timed events run each day at the beginning of the day. Can also run during AI's turn. This also allows you to set events that'll run during "night time". So e.g. you could trigger a combat on one of your Towns during red's turn.
I'm silent in seven languages - and I got all my familys fear.
Everytime you throw dirt, you loose a little ground

User avatar
iLiVeInAbOx05
Equilibris Team
Equilibris Team
Posts: 773
Joined: 21 Jul 2014

Unread postby iLiVeInAbOx05 » 26 Sep 2014, 14:48

Has anyone here experimented with placed events on top of placed events? I've been doing some scripting for some combats and it was a pain in the ass to do for just a single one, and I have to script almost exactly the same thing for about 5 other combats and I would really like to reuse what I've already done.

Unfortunately there is only limited reusability with the scripting system in place. I did have the idea that I could place on event one top of another, and there would likely be a certain order these events were called, which would enable me to do some setup before the next placed event was called.

Has anyone tried this before? I'll be looking into it when I get home, but would be nice to hear what others have done.

User avatar
Duzeom_
Conscript
Conscript
Posts: 235
Joined: 07 Mar 2011

Unread postby Duzeom_ » 27 Sep 2014, 07:26

Placed events stack one on top of other are triggered with the order you placed it.

User avatar
iLiVeInAbOx05
Equilibris Team
Equilibris Team
Posts: 773
Joined: 21 Jul 2014

Unread postby iLiVeInAbOx05 » 27 Sep 2014, 15:57

Duzeom_ wrote:Placed events stack one on top of other are triggered with the order you placed it.
Yep, the bottom event executes first, and then the one above.

User avatar
Karmakeld
CH Staff
CH Staff
Posts: 1126
Joined: 12 Nov 2011

Unread postby Karmakeld » 28 Sep 2014, 09:57

iLiVeInAbOx05 wrote:..I've been doing some scripting for some combats and it was a pain in the ass to do for just a single one, and I have to script almost exactly the same thing for about 5 other combats and I would really like to reuse what I've already done.

Unfortunately there is only limited reusability with the scripting system in place. I did have the idea that I could place one event one top of another, and there would likely be a certain order these events were called, which would enable me to do some setup before the next placed event was called.
Could you be more specific about what you want from these combat scripts? (share the script or something). If you just want the same script to run at different Places, just place the events where you want them. Using the extra placed event, you can bomb the triggered one instead of 'removing script', leaving the rest for later.

Althought I'm not that much into it, I think the H4 Utility program should allow you to copy scripts if that's what you want.
I'm silent in seven languages - and I got all my familys fear.
Everytime you throw dirt, you loose a little ground

User avatar
iLiVeInAbOx05
Equilibris Team
Equilibris Team
Posts: 773
Joined: 21 Jul 2014

Unread postby iLiVeInAbOx05 » 28 Sep 2014, 14:56

Karmakeld wrote:Could you be more specific about what you want from these combat scripts? (share the script or something). If you just want the same script to run at different Places, just place the events where you want them. Using the extra placed event, you can bomb the triggered one instead of 'removing script', leaving the rest for later.

Althought I'm not that much into it, I think the H4 Utility program should allow you to copy scripts if that's what you want.
Basically I wanted to be able to reuse scripting, and just change the variables so I could run different combats and not have to write as much scripting (basic programming principles: if you have code that you are copying and pasting, make it a function and pass in the parameters that change).

Unfortunately for some scripting (such as combat where it has to be attached to something that can have a combat), this isn't as easy to do. If I could use triggerable events for combat, that would solve everything, but it has to be attached to something like an army, town, etc. Or in this case, a placed event.

So I've kind of gone around the problem by putting a placed event down first to initialize my "parameters," and then my main battle script is on a placed event that I put on top of the first one, which uses the "parameters" I previously initialized.

Still not ideal, but it's better than having to script the same thing over and over!

If H4Util allows you to copy / paste scripts, that would definitely be helpful!

User avatar
Karmakeld
CH Staff
CH Staff
Posts: 1126
Joined: 12 Nov 2011

Unread postby Karmakeld » 29 Sep 2014, 11:06

After each combat you could increase a variable (e.g. 'combat') by +1. Simply set combat to combat +1. Then you can check how many has been triggered and which one is to be next. But you'd need (as you write yourself), to either place it on a hero/army, town or placed event.
Or do as you've done. Btw. how complex is your combat script?

I think it does, but Again, I haven't fooled around with it that much.
As you're familiar with programming, do you have any experience with obj files? I'm seeking to add some adventures objects, but I can't read the excisting ones Thus I don't know how to add new ones. Also I'd like to add a new quest hut.
I'm silent in seven languages - and I got all my familys fear.
Everytime you throw dirt, you loose a little ground

User avatar
iLiVeInAbOx05
Equilibris Team
Equilibris Team
Posts: 773
Joined: 21 Jul 2014

Unread postby iLiVeInAbOx05 » 29 Sep 2014, 15:36

Karmakeld wrote:After each combat you could increase a variable (e.g. 'combat') by +1. Simply set combat to combat +1. Then you can check how many has been triggered and which one is to be next. But you'd need (as you write yourself), to either place it on a hero/army, town or placed event.
Or do as you've done. Btw. how complex is your combat script?

I think it does, but Again, I haven't fooled around with it that much.
As you're familiar with programming, do you have any experience with obj files? I'm seeking to add some adventures objects, but I can't read the excisting ones Thus I don't know how to add new ones. Also I'd like to add a new quest hut.
Well that won't work in this case because the player can choose the order of who they fight against (training grounds), so it has to be asynchronous.

I've also now included pseudo random opponents for my random chance battles, ie. if the battle hits, I can either go with a single battle, or I have a triggerable script that will return me an int between 0 - 3 which is based on percentages that can be tweaked for difficulty. Then just check the int, and choose the proper battle. I went with 4 levels to be consistent with creature levels. Level 0 is the most likely to occur and level 3 is the least likely.

I feel like only one of my combat scripts is complex, and that's only because I was trying to catch all cases of what a player might do. My random battle scripts are actually pretty straight forward (I think anyway :D). For the placed event, all you have to do is call the triggerable event check for random battle, then check the variable it sets and if true, you can either just trigger a combat, or you can call a script which randomly sets the level (based on the level weights) and script battles based on that integer (0-3). If the battle check script returns false, call the triggerable event to increase the threshold (if they take enough steps on the placed events, they will eventually have to fight).

That's all you have to do to use my random battle scripts. These scripts can be used to have random battle areas anywhere you want. I'm using that script for 2 areas so far (soon to be 3 when I can get to it), so I also have a triggerable event for each area that calls the battle check script, but then performs its own check against another variable so that I can turn the random battles off for specific areas after players have gone through and completed whatever quest they're supposed to complete.

If you're interested in taking a look at / using these scripts let me know. I'll dl h4util and pull the scripts out (if that's possible) and put a readme with an example of how to use them :D

As far as .obj files, I'm not familiar with them, but I did a little googling and it looks like you can probably download some free software to create your quest hut, and then export it as a .obj file. After that however, I don't know if it's as easy as adding the file where the others are, and then putting it on the palette, or if there's something more involved that has to be done :( Seems like there isn't a lot that can be easily modded with this game! If we could get a hold of the source code, that would be pretty cool ;)

User avatar
Karmakeld
CH Staff
CH Staff
Posts: 1126
Joined: 12 Nov 2011

Unread postby Karmakeld » 02 Oct 2014, 17:45

Again, I haven't taken the time to play with the h4util yet, but I think it's possible, atleast I recall reading so. (the readme file should say). I know you're supposed to be able to use it for easier scripting, rather than have to use all the strings in the editor.

I found a obj. file extractor, but it seemed limited atleast the free part.
I've found some codes, but all seems to be connected to skills, spells, creatures etc. None of the treads I've found mentions anything about add new objects, only changing/adding creatures/creature skills and skill stats.
Equilibris proved it possible, but I guess it's a longshot hoping to get them to share what sourcecodes they might've found. And I have no experience on this matter myself, so I guess it won't happen..
I'm silent in seven languages - and I got all my familys fear.
Everytime you throw dirt, you loose a little ground

User avatar
Maciek
Scout
Scout
Posts: 168
Joined: 14 May 2009
Location: Poland

Unread postby Maciek » 03 Oct 2014, 20:47

iLiVeInAbOx05 wrote:If H4Util allows you to copy / paste scripts, that would definitely be helpful!
It does. You get your scripts written in C-styled text, so you can copy/paste/type/modify them easily.
By the way, you could put your triggerable scripts that do some randomizing/calculations on neutral heroes or armies. Then you could easily copy-paste them if you want to use them in a different map.
Duzeom_ wrote:The kingdom for the ability to delete castles! It is most annoying limitation of editor
While you can't delete castles, you can simulate deleting buildings from a town.
Here's how:
1. Put another castle on top of the original one. The other one could be neutral, with buildings that you want to 'delete' disabled and empty garrison.
2. On day 1, change your first castle to some other colour and back.
3. When you want to do the 'deleting', swap the towns' colours. First the old one, then the new one.

One problem may be that your castle now shows as gray on minimap.
Alternatively, you could put the new castle under your first castle, then skip step 2. Then your castle will show as gray on minimap before the change, and correctly after.
Or you could put some mines/dweelings or something similar under the castles for correct colour on minimap.

Just don't simulate deleting Fort/Citadel/Castle. You want the new town to look the same as the old one.
Oh, you could also put more towns on top of eachother and then simulate deleting dweelings gradually by changing their colours.

Example here: deserted castles
iLiVeInAbOx05 wrote:Ah, I was thinking continuous event was just run once each day, but you can do that with timed events. So continuous events are always running, so I'll stay away from those
For some insight on how often does a continuous event actually run, you could make a simple continuous event that gives you 1 Sulfur every time it triggers, put it on your starting hero (or anywhere else) on some map, then run around the map a little and see what happens.
Anyway, who will fight those random battles? The player's starting hero? A hero hired from tavern?

Perhaps you want to trigger the fights using continuous events instead of placed?

Example here: random fights. All scripts are on your starting hero.

User avatar
iLiVeInAbOx05
Equilibris Team
Equilibris Team
Posts: 773
Joined: 21 Jul 2014

Unread postby iLiVeInAbOx05 » 04 Oct 2014, 02:08

Maciek wrote:It does. You get your scripts written in C-styled text, so you can copy/paste/type/modify them easily.
By the way, you could put your triggerable scripts that do some randomizing/calculations on neutral heroes or armies. Then you could easily copy-paste them if you want to use them in a different map.
Can I copy/paste scripts with H4Util from one map to the next? That would definitely be helpful so that I could just copy my random battle scripts from one map to the rest!
Maciek wrote:For some insight on how often does a continuous event actually run, you could make a simple continuous event that gives you 1 Sulfur every time it triggers, put it on your starting hero (or anywhere else) on some map, then run around the map a little and see what happens.
Anyway, who will fight those random battles? The player's starting hero? A hero hired from tavern?

Perhaps you want to trigger the fights using continuous events instead of placed?
Continuous event random battles would be useful for certain situations, but for what I'm trying to do, I want specific areas to trigger battles randomly while the hero is walking around. Think of RPG's like Final Fantasy where your party can move around in certain places and have to fight randomly. I can't quite do that with a continuous event, since the act of walking doesn't trigger it.

This series of maps will focus more on smaller armies (strong heroes), so the events are geared toward the heroes triggering them, although currently any hero or creature can trigger the combats in the random battle areas (for the player's color, no one else can trigger them).

User avatar
iLiVeInAbOx05
Equilibris Team
Equilibris Team
Posts: 773
Joined: 21 Jul 2014

Unread postby iLiVeInAbOx05 » 20 Oct 2014, 23:50

Small update: A little more than half the map is complete (XL maps are huge!).

Got most of the story done, including some issues with the player being able to do things in different orders.

Haven't fine tuned the combats yet (how many enemies to fight), I'll get that done once the map is pretty much finished and all my scripting is tested :)

User avatar
iLiVeInAbOx05
Equilibris Team
Equilibris Team
Posts: 773
Joined: 21 Jul 2014

Unread postby iLiVeInAbOx05 » 21 Jan 2015, 18:21

Update: I've finished the prologue map, and all of the terrain for the first map. I'm almost done with the story for the first map, then I'll do a few run throughs and fine tune enemy interaction / difficulty :)

Then.. on to the next map!

I've thought about making the first two maps of the campaign available for testing, but since it's a single campaign instead of separate maps (as Karmakeld suggested, which would make testing easier), I'll probably wait.


Return to “Heroes I-IV”

Who is online

Users browsing this forum: Bing [Bot] and 24 guests