urbansquall
57 posts
|
We’re going to be posting a lot more information on scripting in Battalion, but for now you can check out the Scripting Reference to get an idea of what the system is capable of:
http://www.urbansquall.com/blog/wp-content/uploads/2009/07/battalion_scripting_reference.pdf
|
|
|
JohnnyCrunk
57 posts
|
I really love what you did with the map editor and especially like how you added a scripting feature as well. I even expect to see user-made campaigns being created later in the future. I tried it myself and it is definitely a very useful tool. I have, however, found many problems where certain conditions/responses do not work properly but they are too many too list. It is not a big deal at the moment but after Beta I really hope the scripting is fixed and even improved.
|
|
|
urbansquall
57 posts
|
It will be Johnny, it’s just not something we’re focused on at this point.
|
|
|
Jabor
11382 posts
|
Suggestion: Have an output console which shows messages from trace responses. Making it useful for debugging complex scripts.
|
|
|
Bazooka_Uka
11 posts
|
This script feature is truly awesome. I can see huge possibilities!
Right now, I’m working on creating a Scorpion Tank v2.0, which can move twice per turn. However, I’m stuck. I’ve made a counter that increases by one every time the tank moves, and I would like to create conditions so when the counter reaches 1, unitDisable is false, thus giving the tank another move, but you can only specify units on unitDisable by location, instead of name. That would be a great addition. Also, I need the counter to go to 0 at the start of every turn, but since there is the possibility that the player will not move the tank twice, using decrementCounterVariable could get the counter into negatives or otherwise mess things up. Therefore, I think another great idea would be the ability to make a response where you change a counter to an integer rather than increasing it or decreasing it by an integer.
I’m not trying to nitpick or anything, this is an amazing feature and I know it’s in alpha. Hopefully I’m helping out with this and not just being annoying (I could also be overlooking some obvious way to get my idea working; I’m a noob at this). Great work!
|
|
|
Terabyte324
161 posts
|
This looks interesting but I have a little question. In the appendix in the terrain names section there’s desert, canyon, wasteland, and volcano, are these new terrain tiles you’re developing or something?
EDIT: I read everything and then tried to make a simple script where Argent pops up at the beginning of the game and says “Testing, testing, one two three…hello?” but it didn’t work.
This is the script
http://tinyurl.com/mexa4r
|
|
|
urbansquall
57 posts
|
A less irritating way to share snippets: http://www.copypastecode.com :)
We’ll be doing a lot to give how-tos for scripting and creating new scripting conditions and responses so people can tweak the game every which way you want, but right now we’re focusing on getting everything else going 100%.
Bazooka: That’s a pretty cool idea, I never even thought about trying to use the scripting that way. I don’t think it’s possible just yet, but I think we will be able to in the future.
Terabyte: We’ve got a couple new terrain tiles we’re working on. Again, they’re not in the core experience so we’re holding off releasing them until everything else is good to go (which will be soon!).
|
|
|
Terabyte324
161 posts
|
Thanks for the website urban, I edited my post so it has the tinyurl it gives you so people can see my code because I have no idea what’s wrong with it. Another little problem/question, so I’m in the map editor and I put my code into the script menu, then I hit test to see if it works which, it doesn’t, but when I forfeit and go back to the editor and click on the script menu my code has disappeared. Is there something special I have to do to make it stay there or something?
|
|
|
YAYitsAndrew
26 posts
|
It looks like you’ve got some typos. “start game” should be “startGame”, and “disablecontrollers” should be “disableControllers”. Scripting, like most programming, is very picky about spaces and capitalization.
Part 3 of our scripting tutorial at urbansquall.com deals specifically with chatting, so it should be a good example for you to follow.
http://www.urbansquall.com/blog/2009/07/31/game-scripting-part-3-the-guide/
|
|
|
Terabyte324
161 posts
|
Thanks both of you, I finally got it to work but I found a bug with the avatars that maybe you guys can work out for the final version. When the avatar value is set to “argent” all you get is a black box but when you set it to “tucker” argent’s avatar comes up.
|
|
|
YAYitsAndrew
26 posts
|
Thanks I will look into it.
|
|
|
Conquerer95
2815 posts
|
You guys are the best, thanks for making this a great game. I loved testing it, and can’t wait for map scripting! :)
!
|
|
|
Terabyte324
161 posts
|
Yeah…me again, that bug I reported about Argent and Tucker, turns out I thought Tucker’s name was Argent, but still when it’s set to Argent nothing comes up, just clearing it up though.
|
|
|
Gerk
37 posts
|
Here’s my adventure
http://www.copypastecode.com/9193/
This is meant to ‘top up’ the Adv. Oil Refineries to $1000 every turn…but it only fires once, and gets discarded.
|
|
|
iopred
15 posts
|
Gerk, you can put repeats=“infinite” in the event tag, and the event will happen every turn.
|
|
|
Conquerer95
2815 posts
|
I’ve gathered a couple on the links that are spread out across the Battalion:Arena forums. Here is a scripting information directory; it gives a lot of information on scripting, and links to specific scripting locations. http://www.kongregate.com/forums/14/topics/53612
|
|
|
JohnnyCrunk
57 posts
|
I hope the developers still read through these forums because I need some help on a script that limits units in a map. It should be working but it could be a mistake on my end or a problem in the game script editor. This is the link to the thread I made about the script. A reply in either this thread or the other one I made would be highly appreciated.
|
|
|
ItsColdInHere
253 posts
|
Ok, so im confused as to how the Boolean Variable works, or what it does?
|
|
|
ItsColdInHere
253 posts
|
After you answer that, can you tell me what is going wrong with this script? http://www.copypastecode.com/21184/ It works until I add that createUnit code…
|
|
|
cementblocks
91 posts
|
player value=“^1”
should be
player value=“1”
And try removing the resources value line, I haven’t been able to make a script work with one in it.
|
|
|
ItsColdInHere
253 posts
|
|
|
|
ItsColdInHere
253 posts
|
http://www.copypastecode.com/21226/
Alright, sorry to bother you again, but I am trying to make reinforcements (the three scorpion tanks) appear for player two in round ten… and there is some error that is preventing everything except the chat from working… Please help, I really want to finish this map lol…
|
|
|
cccool925
886 posts
|
Originally posted by ItsColdInHere:
http://www.copypastecode.com/21226/
Alright, sorry to bother you again, but I am trying to make reinforcements (the three scorpion tanks) appear for player two in round ten… and there is some error that is preventing everything except the chat from working… Please help, I really want to finish this map lol…
You didnt put it for player 2
|
|
|
gbot
17 posts
|
I know scripting is still in beta – but any ETA on when scripting will be fixed so we can publish maps with scripts? It’s quite annoying to build a map, put in a script – only to have the map disappear once you save it.
|
|
|
xyklos_servant
10 posts
|
Hi guys. I’ve reviewed the pdf reference, and the tutorial on chatting basics. I don’t know of any other Battalion XML reference out there. What are some scripting basics in order to make cooperative games?
|