[ian-reeds-games] Re: warlords, prepare to conquer!

  • From: "Allan Thompson" <allan1.thompson@xxxxxxx>
  • To: <ian-reeds-games@xxxxxxxxxxxxx>
  • Date: Wed, 21 Aug 2013 21:02:20 -0400

Hi Abi,

I am a little lost.

 

So there is this line of code in this particular email. That is all that goes 
into the recruit skills?

 

The other stuff, you said that goes into the scripts folder?

I am looking at it, and what I see is Ian and Craig’s name there. I guess I 
would make a folder with your name and put that code in, right?

It looks like it is named  XX.js, so what should I name the file?

 

What are ARGS? I think I understand enough to switch out the skill name and the 
unit type. Do I have to make a separate script.js file for each unit/recruit 
skill?

 

Sorry, like I said, bear, space shuttle, nothing good can come from such a 
combo, lol. 

 

Thanks for being patient,

al

 

From: ian-reeds-games-bounce@xxxxxxxxxxxxx 
[mailto:ian-reeds-games-bounce@xxxxxxxxxxxxx] On Behalf Of abigail prescott
Sent: Wednesday, August 21, 2013 4:36 PM
To: ian-reeds-games@xxxxxxxxxxxxx
Subject: [ian-reeds-games] Re: warlords, prepare to conquer!

 

I’ve got it! At least, I’ve got the structure naming bit, not the numbering 
bit. But now it’ll name your archers from Camelot Camelot bowmen. It’s an 
after_perform now because that worked better.

 

In all recruiting skill files:

after_perform=add_unit@ { }

 

I’ll send a link for the function in a bit, but windows explorer seems to have 
frozen, so I don’t know how long that’ll take. Do you understand how to add if 
blocks? I’ve only done archers to demonstrate because I haven’t played the 
latest warlords version yet (though I’m quite excited about it and probably 
will in a few minutes) and it sounds like there are a lot of units to add.

 

Abi

 

From: abigail prescott <mailto:abigail.prescott@xxxxxxxxxxx>  

Sent: Wednesday, August 21, 2013 7:32 PM

To: ian-reeds-games@xxxxxxxxxxxxx 

Subject: [ian-reeds-games] Re: warlords, prepare to conquer!

 

I think it might be possible, but I’ll do some testing first because the idea 
I’ve got seems like it’ll depend on a few factors which will overcomplicate 
things.

 

In the unit file:

 

after_create=name_unit@ { }

 

In a file in the scripts folder:

 

function name_unit(args) {

if (args.unit.Type==”archer”) {

args.unit.Name=”bowman”;

}

}

 

This will name the units without the structure and numbering and I’ll get back 
to you if I can get any further on that. For the other units, you can copy and 
paste the block starting at if ( and ending at the first right-brace and change 
the “archer” to “whatever the unit type is” and the “bowman” to “name of unit”. 
Hope that makes sense. If not, just ask me to explain what’s confusing you.

 

Lol. I just like looking at examples and messing around to see what works (and 
bombarding Ian with questions, of course), but I’ve done some programming 
before so I understand the basic concepts. I’m going to start computing alevel 
this year too, so hopefully I can learn some more.

 

Abi

From: Allan Thompson <mailto:allan1.thompson@xxxxxxx>  

Sent: Wednesday, August 21, 2013 6:50 PM

To: ian-reeds-games@xxxxxxxxxxxxx 

Subject: [ian-reeds-games] Re: warlords, prepare to conquer!

 

Hi,

Wow, that is awesome! I am constantly amazed at people who can make sense of 
this stuff.

So, would this be like a skill kind of thing? I really am clueless. I can 
program, like a bear can fly a space shuttle. Both would most likely end in 
disaster, lol.

 

Would it be possible to even include the name of the recruiting structure?

For instance, if the number thing was doable, and if you had a city named 
Camelot, and it made a unit of archers, then could it be possible to  have that 
unit pop out as…

1st Camelot bowmen 

 

Is it even possible? I really don’t know. Thanks. I want to try it. Where would 
I put it?

al

From: ian-reeds-games-bounce@xxxxxxxxxxxxx 
[mailto:ian-reeds-games-bounce@xxxxxxxxxxxxx] On Behalf Of abigail prescott
Sent: Wednesday, August 21, 2013 1:21 PM
To: ian-reeds-games@xxxxxxxxxxxxx
Subject: [ian-reeds-games] Re: warlords, prepare to conquer!

 

If by autonaming you mean the unit is given a name as it is created, you could 
do it with an after_create script. I’m not sure if there’s a way to count how 
many of each type of unit exist though, so I don’t know about the numbering. 
Apart from that, I think it would be after_create=name_unit@ { } and the 
name_unit function would be:

 

function name_unit(args) {

args.unit.Name=”name”);

}

to give different names depending on type you would add in an if statement:

 

function name_unit(args) {

if (args.unit.Type==”archer”) {

args.unit.Name=”bowman”;

}

}

 

Not sure if that helps, but that’s all I can think of that sounds like what you 
want.

 

Abi

From: Allan Thompson <mailto:allan1.thompson@xxxxxxx>  

Sent: Wednesday, August 21, 2013 6:04 PM

To: ian-reeds-games@xxxxxxxxxxxxx 

Subject: [ian-reeds-games] Re: warlords, prepare to conquer!

 

Hi Carlos,

Thanks for the kind words in your other email.

I think you are right. I had wanted to do that, but I wasn’t sure how all the 
others would like having units pop up already ai controlled. With so many units 
on the board though, it becomes really hard to keep track, and sometimes you 
just want to deal with  one battle at a time.

 

What would be ideal is if there was an option that , upon recruitment, the 
player is asked if they want to start with ai on or off. Maybe that would be a 
bit much much, but I guess it is just as easy to hit the control+shift +a combo.

 

Also, an auto naming of units would be excellent. With the experience points 
thing, it is fun, but it is also crazy trying to keep track of them. I would 
simply have a document out to keep track of the units, but that gets tedious as 
well.

 

With an auto naming feature they would pop out with names/numbers for easier 
tracking. No idea how that would happen on the coding side, or if it is super 
difficult, etc. 

 

My naming conventions are feature a number (1st, 2nd, 3rd, etc) plus these…

Infantrys I call legions

Archers I call bowmen

Cavalries I call horse

Catapults I call artillery

And like Michael, I rarely name the special characters unless ther is more then 
one of them. Although sometimes I name them after political leaders just for 
kicks, or famous generals, or whatever, I use a theme, grin.

 

I will put ai control into all the units. I think that is probably the best way 
to deal with it for now, so people can choose for themselves.Thank you for 
suggesting that.

 

al 

 

From: ian-reeds-games-bounce@xxxxxxxxxxxxx 
[mailto:ian-reeds-games-bounce@xxxxxxxxxxxxx] On Behalf Of Carlos Macintosh
Sent: Wednesday, August 21, 2013 7:29 AM
To: ian-reeds-games@xxxxxxxxxxxxx
Subject: [ian-reeds-games] Re: warlords, prepare to conquer!

 

This is a weakness of mine, not you, but still, I thnk we should be able to 
toggle AI controlled on our units. That way if you want to attack something you 
can focus on recruiting the units and leave the moving to the AI. Or if you 
want to deploy your forces intelligently you can do that too. It’s  a problem I 
have with any map where you recruit things. Because thigs get really hectic 
really fast when you have 20, 30, even 40 units and you  have to keep track of 
all of them.

Other related posts: