Local Variables for the AI

Post Reply
User avatar
Kyran
Posts: 499
Joined: Sat Dec 31, 2011 5:19 pm
Location: Australia
Contact:

Local Variables for the AI

Post by Kyran »

This is my old AI from 2010. I want to make it release worthy. I need to make jadeite_stepping local to the AI. I'm thinking about turning it into an array jadeite_stepping[AiPlayer], would there be a better way?
Attachments
ai_jadeite.lua
(11.93 KiB) Downloaded 684 times
04:27 jim4 why haven't you added wc1 support? this project sucks. i'm only going to use freecraft
05:06 jim4 finished wc1 support yet? i've been waiting for 6 years
05:10 jim4 new things scare me
User avatar
jarod42
Posts: 101
Joined: Fri Jan 20, 2012 7:43 pm

Re: Local Variables for the AI

Post by jarod42 »

Using Array with AIPlayer is the way used in wargus,
and it seems a good way to handle AI variables in script.

Note that lua function "CleanGame_Lua()" is called when a game ends and those variables should be cleaned in that function.

Note also that local variables are not saved.

I read your script:
Don't use Math.random since you may have desync in MultiPlayer.
Use SyncRand instead.
faarizamar
Posts: 1
Joined: Fri Jan 16, 2015 5:13 pm

Re: Local Variables for the AI

Post by faarizamar »

I am looking for a game engine that can run as a turn based game. Stratagus caught my attention, and before investing a lot of time, blood, sweat, and tears I wanted to ask if this engine is able to do turn based strategy or not.
Our excellent online a+ certification training programs sy0-401 will lead you network+ study guide pdf to success in the We also offer latest and Rasmussen College with 100% success guarantee. Our Sterling College is rare in IT world.
User avatar
b_o
Posts: 328
Joined: Sun Jan 01, 2012 12:07 pm

Re: Local Variables for the AI

Post by b_o »

Wyrmsun grand strategy mode has turn based management, with RTS battles. If you want a game like that grand strategy mode without the RTS battles, that should work with a little work.
User avatar
Kyran
Posts: 499
Joined: Sat Dec 31, 2011 5:19 pm
Location: Australia
Contact:

Re: Local Variables for the AI

Post by Kyran »

Probably would be better if you try Battle for Wesnoth or FreeCiv first.
04:27 jim4 why haven't you added wc1 support? this project sucks. i'm only going to use freecraft
05:06 jim4 finished wc1 support yet? i've been waiting for 6 years
05:10 jim4 new things scare me
User avatar
cybermind
Posts: 110
Joined: Sat Dec 31, 2011 11:43 pm

Re: Local Variables for the AI

Post by cybermind »

So much talking with a bot :)
Post Reply