Call to H-IV mapmakers - AI enchancing scripts

The old Heroes games developed by New World Computing. Please specify which game you are referring to in your post.
User avatar
iLiVeInAbOx05
Equilibris Team
Equilibris Team
Posts: 773
Joined: 21 Jul 2014

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby iLiVeInAbOx05 » 18 Sep 2016, 14:07

I'm not sure what you mean. I am placing the heroes at a fixed spacing across the entire map (and underground if there is one). I've also verified that if one of the show map heroes is placed on top of another stack that the heroes are still killed and don't affect the stack they were placed on.

I'll get a screen shot in a moment to show what the map looks like in the editor :)

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

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby Karmakeld » 18 Sep 2016, 16:44

I think what Taro is asking, is if you placed the heroes manually. If so, how will the script work on a given map, simply by using the H4MG? It can't place the heroes at random points, right?
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

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby iLiVeInAbOx05 » 18 Sep 2016, 17:29

The H4MG places the heroes on the map. Placing them at random wouldn't really be useful, since the amount of the map shown to the AI would then be a bit random. Also, Taro linked a good article on the first page of this thread that talks about the AI's behavior with varying degrees of the map displayed.

So, I start at the top left corner of the map, then increase the row by 12. Then I go to the first column in that row, increase that column number by 12, and place a "show map" hero. Next I increase the column by 12, and if the column is valid, I place another, otherwise we're finished with this row. Increase the row by 12, and start again. Do this until the last valid row for the map.

I saved the "show map" hero to file so that I can load it in when the program starts up, and then place copies on the map. Since it's saved to file, it already has the needed scripting on it. So the heroes are placed on the map, and a timed event is added to the map to call the triggerable event on the heroes.

In the screen shot below, the neutral heroes are the "show map" heroes. If you look at the mini map, you can see how they're spread across the map.

Image

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

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby Karmakeld » 19 Sep 2016, 19:16

Okay random was a bad choice of word, but I'm surprised you can actually place them on the map without entering the editor, that's really handy. And tbh. I didn't think it possible.
I'm silent in seven languages - and I got all my familys fear.
Everytime you throw dirt, you loose a little ground

User avatar
Taro
Scout
Scout
Posts: 163
Joined: 11 Feb 2011
Location: Poland

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby Taro » 19 Sep 2016, 19:26

I'm surprised as well. If there is no need to place these heroes manualy that's great!

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

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby iLiVeInAbOx05 » 19 Sep 2016, 19:47

Karmakeld wrote:Okay random was a bad choice of word, but I'm surprised you can actually place them on the map without entering the editor, that's really handy. And tbh. I didn't think it possible.
How do you think a random map generator will work? ;)

Just messing with you :) The H4MG can place any object on the map. All it has to do is create the object, set the row, column, and level, then add it to the map's list of objects and it gets placed in the map file once you hit save.

The H4MG is also able to save any object, event, or just about any setting (basically any of my coded objects that has a getBytes() method can be easily saved to file), which is also really useful.

Taro wrote:I'm surprised as well. If there is no need to place these heroes manualy that's great!
There is no need to place the "show map" heroes yourself. Simply check the "Show map for AI" check box, and then when you click "apply" on the AI panel everything will be inserted onto the map. Clicking the "remove" button on the AI panel will remove all of the "show map" heroes. The "remove" button gets rid of anything and everything that the H4MG AI panel injects into the map.
Last edited by Anonymous on 20 Sep 2016, 12:34, edited 1 time in total.

User avatar
Dalai
Equilibris Team
Equilibris Team
Posts: 1073
Joined: 06 Jan 2006
Contact:

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby Dalai » 20 Sep 2016, 10:39

iLiVeInAbOx05 wrote:How do you think the random map generator will work? ;)
Next step will be allowing someone smart to use the technology. I'm thinking of iPhone 7. It will make human mapmakers obsolete. :o[

Hail to the progress! :victory:
"Not a shred of evidence exists in favour of the idea that life is serious." Brendan Gill

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

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby Karmakeld » 21 Sep 2016, 06:59

iLiVeInAbOx05 wrote:
Karmakeld wrote:Okay random was a bad choice of word, but I'm surprised you can actually place them on the map without entering the editor, that's really handy. And tbh. I didn't think it possible.
How do you think a random map generator will work? ;)
Hmm.. Real easy being funny at someone elses expense, ain't it? Well, guess I had it comming :wall:
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

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby iLiVeInAbOx05 » 10 Oct 2016, 05:17

The H4MG has been updated to include AI enhancing events. Please see the news article here for more information.

Give it a try and let us know how it goes! If you experience any bugs or other issues, you can post them here or in the H4MG thread here.

Thoughts and feedback would be much appreciated :)
Last edited by iLiVeInAbOx05 on 10 Oct 2016, 05:17, edited 1 time in total.

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

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby Karmakeld » 16 Oct 2016, 10:13

Just read you have plans to make an AI dwellings increase script. I tried that in on of my maps, and it absolutely bugged out majorly, when you load.
I will find some of my old map versions and also see if I got some save files. It would be neat if you could find a way to fix this, but there are several increase/decrease bugs that appears after loading. I recall Maciek and I posted several of them in the bug tread.
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

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby iLiVeInAbOx05 » 16 Oct 2016, 18:33

Okay definitely send me the map when you find it so I can take a look at how the scripting is being done.

The way I am implementing it is based on numeric variables that get increased by the creature experience amount each day, and if there is enough experience for a full creature, then the dwelling gets increased.

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

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby Karmakeld » 16 Oct 2016, 21:33

I did it the simple way, by checking if owner is AI, then setting daily script to increase the dwelling population, but I'll find the map/script for you..
I'm silent in seven languages - and I got all my familys fear.
Everytime you throw dirt, you loose a little ground


Return to “Heroes I-IV”

Who is online

Users browsing this forum: Google [Bot] and 35 guests