You must be logged in to post messages.
Please login or register

AI and RM Scripting
Moderated by Crazed Ewok, Gen_Rhys_Dallows

Hop to:    
Welcome! You are not logged in. Please Login or Register.188 replies, Sticky
SWGB Heaven » Forums » AI and RM Scripting » A Newbie's Guide To AI Scripting
Bottom
Topic Subject:A Newbie's Guide To AI Scripting
« Previous Page  1 2 3 ··· 7  Next Page »
Wok
Clone Trooper
posted 02-01-03 04:23 PM EDT (US)         


By Wok



Welcome to my article about AI Scripting. If you want to know what AI
scripting is, or how to do it, you've come to the right place! This guide
will teach you the basic principles of creating AI scripts, and some more
advanced techniques to improve your abilities. This guide was made with the
intent of teaching people how to make AI for scenaio design purposes, but
hopefully everybody will be able to make use of it! Happy scripting!


Table Of Contents:

Part 1 - The Technology
Defining AI
How this relates to the game
Your first script

Part 2 - Basic Functions
Rules
Facts
Fact List
Actions
Action List

Part 3 - Scenario Design Effects
Creating Taunt Effects
Random Numbers

Comments/Suggestions




Part 1 - The Technology

Defining AI:

Before I get underway with my guide, you'll probably want to
know what the topic at hand is all about. What is AI scripting all about?

Well, AI stands for Artificial Intelligence, which basically
means methods that a computer uses to simulate thought. It tells it how to
make decisions based on your interactions, and what to do in certain
situations. Almost every time you make your computer do something, it is
using AI.

What form does it take?

The AI that we will be dealing with in this guide is merely a set of
instructions, typed into a text editor, and used in certain ways to create
effects. That's all you will need to create AI, a text editor (I recommend
NotePad if you are using Windows).

Don't worry if you didn't quite take all that in just yet. AI is a tricky
subject. Here's what we have learned so far:


  • AI is the method a computer uses to simulate thought.
  • It is created in a text editor.


How This Relates To The
Game:


Well, at least you know what AI is now. It is used differently
with all things, and you'll probably we itching to find out what it can be
made to do in-game.

In Star Wars: Galactic Battlegrounds, you can create custom AI scripts or
edit existing scripts to edit how the computer plays in-game, i.e. its
stategy. The computer has a default AI script built into it that tells it
how to play, but creating your own script will change that. Do you want the
computer to rush faster? Do you want it to be more agressive? AI scripting
can make that happen. It can also be used in conjunction with the scenario
editor, and interact with triggers to create powerful effects in-game. AI
for SWGB is a ver powerful tool .

What you should understand by now:


  • AI is the method a computer uses to simulate though.
  • It is created in a text editor.
  • In SWGB, it tells the computer how to play the game.
  • It can be used to create scenario designing effects.



Your First Script:

It's time to learn how you put these scripts into the game, so
you're all set for when you can create them yourself. It's actually quite
simple to put a created script into effect in the game, but it's a step that
many beginners stumble over for some reason

Right, to get a script into the game, you need a script . You won't
understand this yet, it's just to show you an example of a custom script in
a game. First, open up NotePad (I always use it, but if you don't have it
for some reason, a simple, easy to use text editor is the best). Then,
copy/paste the following into your new document:



(defrule
(food-amount > 0)
=>
(chat-local-to-self "My first AI script")
)


That is the script we will use for now. I'll explain what it
means later.

Right, now you have your script, you need to save it. However, AI scripts
cannot just be saved as regular text files. You can try it, but it won't
work! We need to save it as a .per file.

What is a .per file?

For the game to understand the script, it needs to be a .per file. If it
isn't, the computer will skip over it and won't think it's a script.

How do you make it into a .per file?

That is easy. When you save your notepad file, save it as myfirstai.per, and
set the file type to "all files." Of course it doesn't have to be
myfirsai.per, it can be immobile.per, agressive.per, bigbuttocks.per, or
absolutely anything you choose, as long as it is something with .per on the
end. The name you give it now will be its name in the game. For now, save it
as myfirstai.per.

Where do I save it to?

You save your .per file into your SWGB/Game/AI folder. If you don't save it
there, it won't work .

What next?

You've got your .per file and saved it to the right directory, but there's
one more step that you need to take before the computer will recognise the
AI script in-game. This step, however, is much easier. Open up NotePad and
create a new document. Then, without typing anything, save it as
myfirstai.ai. If you saved your .per file under a different name to
myfirstai, then just save the .ai file under the same name as that, instead.
They must have the same name apart from the .ai and .per endings. Save the
.ai file to the same directory as you did the .per file (SWGB/Game/AI). The
.ai file doesn't at all affect the script, it just tells the computer that
there should be a script called samenameasdotaifile.per in the AI folder.

If you have follwed these steps correctly, your new AI will be all ready for
you to use. To test it, run SWGB. Go to the screen where you configure your
random map settings, and for Player 1, under name, set it to myfirstai.
Then, start a random map, with any settings. Upon entering the game, you
should constantly receive chat messages saying "My first AI Script." If you
do, it worked. If you get an error message, or it doesn't give you chat
messages, then you've done something wrong. Go back and double check all of
the instructions I gave you.

Summary of what you now know:


  • AI is the method a computer uses to simulate though.
  • It is created in a text editor.
  • In SWGB, it tells the computer how to play the game.
  • It can be used to create scenario designing effects.
  • To make your script work, you need to save a .per and a .ai file to your
    Game/AI folder
  • You test your script by choosing it in the "Player Name" option in the
    random map settings.



Part 2 - Basic Functions

So, now you know what an AI script is, and how to install a
custom script, but you don't know how to write them yet . This part of the
tutorial will teach you just that - how to write AI scripts.

Rules:

Let's start by defining a rule. An AI script is made up of
many rules that tell the computer how to make decisions. They basically
state: "If [a fact] is true, perform [an action]." For those of you with
programming experience, that is a simple if-then statement.

Here is how a rule is layed out:



(defrule ; This always starts a rule
(fact) ; A valid fact goes here
=> ; Signifies the end of the fact(s), and the start
of the action(s)
(action) ; A valid action goes here. If the fact above is
true, the action will take place.
)


Of course, this isn't a valid rule, as where it says fact and
action, you must replace the text with valid facts and actions (I'll go over
those later). This is just to show you how a rule is set out. The
(defrule always starts a rule, the => signifies the end of the
fact and the beginning of the action(s), and the ) shows the end of a
rule. Remember, if the fact is true, the condition takes place! Drum
that into your mind now, and you won't go far wrong. Everything behind the
semi-colon ( is a comment, and will be ignored by the computer. You can
type whatever you like after a comment, and you won't get errors. You don't
have to have them, but they are convenient.

Now let's look at a valid rule. We'll use the one you used in your first
script earlier:



(defrule
(food-amount > 0)
=>
(chat-local-to-self "My first AI script")
)


For now, I'll tell you that the fact, (food-amount > 0)
means (If you have more than 0 food), and that the action,
(chat-local-to-self "My first AI script") means (Send a chat to
myself saying "My first AI script")


Now, try and guess what this rule does. Highlight the below text to check
your answer.

If you have more than 0 food (the fact), you will recieve a chat message
from yourself saying "My first AI script" (action)..

Did you get it right? Good .

Well, an AI script is made up of almost all rules, so you're not far off
being able to write your own scripts . Now we just need to learn how to
write facts and actions.

Summary so far for this chapter:


  • Rules are the basis of an AI script
  • They state that if a fact is true, then an action is performed.
  • They always start with (defrule, end with ), and have a => in the
    middle.


Facts:

You know what facts are and how they fit into a rule, you just
need to learn how to write them.

Facts are generally layed out like so: ([game stat] [rel-op] [value])

The game stat is something in the game which can be recorded and has a
value. For example, food-amount, or civilian-population. As a
general rule, all game stats have a dash (-) for spaces. There is a list of
all available game stats below.

The rel-op (standing for Relative-Operator) is the method used to compare
the game stat with the value. These are the rel-ops:

== (equal to)
!= (not equal to)
>(greater than)
< (less than)
<= (less than or equal to)
>= (greater than or equal to)


Examples:



([game stat] == [value]) ; Is true if the game stat is equal to the value.
([game stat] != [value]) ; Is true if the game stat is not equal to the
value.
([game stat] > [value]) ; Is true if the game stat is greater than the
value.


etc...

The value could be anything fitting to the game stat. For example, the game
stat food-amount would have a value of any number. The game stat
current-age would have a value of tech-level-1, tech-level-2,
tech-level-3, or tech-level-4
. Just use whatever applies. In most cases,
it is a number.

So, here are some examples of complete, valid facts:



(food-amount > 0)
(current-age != tech-level-1)
(civilian-population == 40)
(civ-selected GUNGANS) ;note - has no rel-op


Of course, there are some facts which are exceptions to the
[game stat][rel-op][value] rule. For example, (cheats-enabled)
needs no rel-op or value. The fact (can-build) has no rel-op but has
a value of a building. For example, (can-build BLDG-PREFAB).
There are also the facts True and False. The True fact is
always true, and the False fact is always false (duh :)).
Rules can also have more than one fact. It would be set out like
this:



(defrule
(fact 1)
(fact 2)
=>
(action)
)


If you have more than one fact in a rule, all facts must be
true before the action takes place.

Summary of chapter so far:


  • Rules are the basis of an AI script
  • They state that if a fact is true, then an action is performed.
  • They always start with (defrule, end with ), and have a => in the middle.
  • Facts usually have 3 parameters: a game stat, a rel-op, and a
    value.



Fact List:

Right, now you know how to create facts, here's a list of
different facts you can use:



true
false
attack-soldier-count <rel-op> <value>
attack-warboat-count <rel-op> <value>
building-available <building>
building-count <rel-op> <value>
building-count-total <rel-op> <value>
building-type-count <building> <rel-op> <value>
building-type-count-total <building> <rel-op> <value>
can-afford-building <building>
can-afford-complete-wall <perimeter> <wall-type>
can-afford-research <research-item>
can-afford-unit <unit>
can-build <building>
can-build-gate <perimeter>
can-build-gate-with-escrow <perimeter>
can-build-wall <perimeter> <wall-type>
can-build-wall-with-escrow <perimeter> <wall-type>
can-build-with-escrow <building>
can-buy-commodity <commodity>
can-research<research-item>
can-research-with-escrow <research-item>
can-sell-commodity <commodity>
can-spy
can-spy-with-escrow
can-train <unit>
can-train-with-escrow <unit>
cc-players-building-count <player-number> <rel-op> <value>
cc-players-building-type-count <player-number> <building> <rel-op>
<value>
cc-players-unit-count <player-number> <rel-op> <value>
cc-players-unit-type-count <player-number> <unit> <rel-op> <value>
cheats-enabled
civ-selected <civ>
civilian-population <rel-op> <value>
commodity-buying-price <commodity> <rel-op> <value>
commodity-selling-price <commodity> <rel-op> <value>
current-age <rel-op> <age>
current-age-time <rel-op> <value>
current-score <rel-op> <value>
death-match-game
defend-soldier-count <rel-op> <value>
defend-warboat-count <rel-op> <value>
difficulty <rel-op> <difficulty>
doctrine <value>
dropsite-min-distance <resource-type> <rel-op> <value>
enemy-buildings-in-town
enemy-captured-relics
escrow-amount <resource-type> <rel-op> <value>
event-detected <event-type> <event-id>
food-amount <rel-op> <value>
game-time <rel-op> <value>
goal <goal-id> <value>
nova-amount <rel-op> <value>
housing-headroom <rel-op> <value>
idle-farm-count <rel-op> <value>
map-size <map-size>
map-type <map-type>
military-population <rel-op> <value>
player-computer <player-number>
player-human <player-number>
player-in-game <player-number>
player-number <player-number>
player-resigned <player-number>
player-valid <player-number>
players-building-count <player-number> <rel-op> <value>
players-building-type-count <player-number> <building> <rel-op> <value>
players-civ <player-number> <civ>
players-civilian-population <player-number> <rel-op> <value>
players-current-age <player-number> <rel-op> <age>
players-current-age-time <player-number> <rel-op> <value>
players-military-population <player-number> <rel-op> <value>
players-population <player-number> <rel-op> <value>
players-score <player-number> <rel-op> <score>
players-stance <player-number> <diplomatic-stance>
players-tribute <player-number> <resource-type> <rel-op> <value>
players-tribute-memory <player-number> <resource-type> <rel-op> <value>
players-unit-count <player-number> <rel-op> <value>
players-unit-type-count <player-number> <unit> <rel-op> <value>
population <rel-op> <value>
population-cap <rel-op> <value>
population-headroom <rel-op> <value>
random-number <rel-op> <value>
regicide-game
research-available <research-item>
research-completed <research-item>
resource-found <resource-type>
shared-goal <shared-goal-id> <value>
sheep-and-forage-too-far
soldier-count <rel-op> <value>
stance-toward <player-number> <diplomatic-stance>
starting-age <rel-op> <age>
starting-resources <rel-op> <starting-resources>
metal-amount <rel-op> <value>
strategic-number <strategic-number> <rel-op> <value>
taunt-detected <player-number> <taunt-id>
timer-triggered <timer-id>
town-under-attack
unit-available <unit>
unit-count <rel-op> <value>
unit-count-total <rel-op> <value>
unit-type-count <unit> <rel-op> <value>
unit-type-count-total <unit> <rel-op> <value>
victory-condition <victory-condition>
wall-completed-percentage <perimeter> <rel-op> <value>
wall-invisible-percentage <perimeter> <rel-op> <value>
warboat-count <rel-op> <value>
carbon-amount <rel-op> <value>


Actions:

We're almost there

Actions are simpler than facts - there's no 3 part layout. It's generally
just something simple like (build BLGD-PREFAB).

You can also have more than 1 action. All of them will fire, one after the
other, the moment the fact(s) are true.

Remember that first script you wrote? This one:



(defrule
(food-amount > 0)
=>
(chat-local-to-self "My first AI script")
)


Well, when you tested it in-game, the chat message should have
repeated itself over and over again - even though there was only one action.
This is because the actions loop. Basically, that means that the actions
keep on taking place again and again the whole time the fact is true. This
will happen in all rules, but there is a way to stop it. There is an action
called (disable-self), which will mean that the actions in the rule
never fire, even while the facts are true. Now, when the computer makes a
rule pass (something the computer does many times a second where it
looks at all the rules in the AI and carries out all the actions that it
should, in order), it will see that the facts are true (if they are ), and
carry out the actions. It will carry out the first action, and then it will
get to the second action, (disable-self). This will disable the rule,
so that even if the facts remain true, the actions will not be carried out
again.
For example, this rule will repeat over and over while the facts are
true:



(defrule
(food-amount > 0)
=>
(chat-local-to-self "My first AI script")
)


But this rule will not. If the facts become true, the actions
will happen once, and then disable:



(defrule
(food-amount > 0)
=>
(chat-local-to-self "My first AI script")
(disable-self)
)


One last thing to note - every rule needs an action (it's
pretty pointless without them ). For testing purposes, the action
(do-nothing) exists.

I think that just about covers everything to do with actions. Here's a list
of ones to choose from:

Action List:



do-nothing
acknowledge-event <event-type> <event-id>
acknowledge-taunt <player-number> <taunt-id>
attack-now
build <building>
build-forward <building>
build-gate <perimeter>
build-wall <perimeter> <wall-type>
buy-commodity <commodity>
cc-add-resource <resource-type> <amount>
chat-local <string>
chat-local-using-id <string-id>
chat-local-using-range <string-id-start> <string-id-range>
chat-local-to-self <string>
chat-to-all <string>
chat-to-all-using-id <string-id>
chat-to-all-using-range <string-id-start> <string-id-range>
chat-to-allies <string>
chat-to-allies-using-id <string-id>
chat-to-allies-using-range <string-id-start> <string-id-range>
chat-to-enemies <string>
chat-to-enemies-using-id <string-id>
chat-to-enemies-using-range <string-id-start> <string-id-range>
chat-to-player <player-number> <string>
chat-to-player-using-id <player-number> <string-id>
chat-to-player-using-range <player-number> <string-id-start>
<string-id-range>
chat-trace <value>
clear-tribute-memory <player-number> <resource-type>
delete-building <building>
delete-unit <unit>
disable-self
disable-timer <timer-id>
enable-timer <timer-id>
enable-wall-placement <perimeter>
generate-random-number <value>
log <string>
log-trace <value>
release-escrow <resource-type>
research <research-item>
research <age>
resign
sell-commodity <commodity>
set-difficulty-parameter <difficulty-parameter> <value>
set-doctrine <value>
set-escrow-percentage <resource-type> <value>
set-goal <goal-id> <value>
set-shared-goal <shared-goal-id> <value>
set-signal <signal-id>
set-stance <player-number> <diplomatic-stance>
set-strategic-number <strategic-number> <value>
spy
taunt <value>
taunt-using-range <taunt-start> <taunt-range>
train <unit>
tribute-to-player <player-number> <resource-type> <value>

Input / Output Actions
chat-local
chat-local-using-id
chat-local-using-range
chat-local-to-self
chat-to-all
chat-to-all-using-id
chat-to-all-using-range
chat-to-allies
chat-to-allies-using-id
chat-to-allies-using-range
chat-to-enemies
chat-to-enemies-using-id
chat-to-enemies-using-range
chat-to-player
chat-to-player-using-id
chat-to-player-using-range
chat-trace
log
log-trace
taunt
taunt-using-range
Rule Control Actions
disable-self
Event Actions
acknowledge-event
acknowledge-taunt
disable-timer
enable-timer
set-signal
Commodity Trade Actions
buy-commodity
sell-commodity
Tribute Actions
clear-tribute-memory
tribute-to-player
Escrow Actions
release-escrow
set-escrow-percentage
Regicide Actions
spy
Cheating Actions
cc-add-resource
Other Actions
do-nothing
attack-now
build
build-forward
build-gate
build-wall
delete-building
delete-unit
enable-wall-placement
generate-random-number
research
resign
set-difficulty-parameter
set-doctrine
set-goal
set-shared-goal
set-stance
set-strategic-number
train



Summary Of Part 2:


  • Rules are the basis of an AI script
  • They state that if a fact is true, then an action is performed.
  • They always start with (defrule, end with ), and have a => in the middle.
  • Facts usually have 3 parameters: a game stat, a rel-op, and a value.
  • There is a list of different facts and actions to choose
    from.



Part 3 - Scenario Design Effects

, now you are capable of creating your own AI scripts. Now I'm
going to teach you how to use them in conjunction with triggers to create
some nifty effects in your scenarios.

What can you do with AI that you cannot do with triggers?

The concept of AI is similar to the concept of triggers (not what they are
used for, but how they work). However, they vary in a few ways. There are
two game stats that can be measured by AI, and not triggers, that can make
neat scenario tricks. Taunts and Random Numbers.

Taunt Tricks:

The taunt trick was first used for SWGB in The Phantom
Menace
, by Tevious. It basically allowed a trigger effect to fire
when a taunt was typed into the chat box.

Since Taunts cannot be regustered by triggers, it must be done with AI. You
use the fact (taunt-detected [value]), to tribute some resources to a
computer player. The resources can be measured with triggers, so can be used
in a condition, which sets off an effect.

You use this AI script to tribute resources:


)
(defrule
(taunt-detected 1 1)
=>
(acknowledge-taunt 1 1)
(cc-add-resource nova 1)
)


The red number is the number of the player sending the taunt.
It will almost always be player 1.
The yellow text is the number of the taunt you want to use. In this case, it
is number 1 ("I got it!")
The purple text is the resource that will be tributed when you type the
taunt. It doesn't matter too much because there are four equal options to
choose from.
The green number is the amount that of the resource that will be tributed.

Then, save your AI as taunt.per, inside your Game/AI directory. Then create
a blank document and save it as taunt.ai, inside the same folder.
Inside the scenario builder, you need to set up triggers.
You need to make a trigger system so that when the player receives the
resource you specified in the AI, it does a desired effect (It could be to
heal a character, for example). Then, it tributes the resource back to GAIA,
so you can use the effect again.

Random Numbers:

Ever wanted to make a completely random effect in your
scenario? Well now you can . Many methods of simulating this have been
attempted, but the most fool-proof way is through the use of AI. Luckily,
the AI for this game has a (set-random-number) action .

Start by pasting the following into NotePad:



(defrule
(true)
=>
(set-random-number 4) ;This code generates a random number
between 1 and 4 at the beginning of the scenario
(disable-self)
)

(defrule
(random-number == 1) ;This code tributes 1 food if the random
number equals 1
=>
(cc-add-resource food 1)
(disable-self)
)

(defrule
(random-number == 2) ;This code tributes 1 carbon if the
random number equals 2
=>
(cc-add-resource carbon 1)
(disable-self)
)

(defrule
(random-number == 3) ;This code tributes 1 nova if the random
number equals 3
=>
(cc-add-resource nova 1)
(disable-self)
)

(defrule
(random-number == 4) ;This code tributes 1 ores if the random
number equals 4. Note == In AI ore is called Metal.
=>
(cc-add-resource metal 1)
(disable-self)
)



Save the file into your Game/AI folder as random.per, then
create a blank text document. Save it into the same directory as random.ai.

Then whenever you start a game and somebody has this AI, a random number
will be set. If it is 1, 1 Food will be tributed to the player. If it is 2,
1 Carbon will be tributed to the player. If it is 3, 1 Nova will be tributed
to the player, and if it is 4, 1 Ore will be tributed to the player. You can
use this in combination with triggers to make a nice effect, like a random
character or a random hitpoint increase.



Comments/Suggestions:

Thank you for reading my AI tutorial. If you have any questions
related to my tutorial or to AI scritping, then please ask me via this
thread and I will try my best to answer. If I have lots of questions, I may
start a small FAQ.

I have also undoubtable made errors in spelling, so if you spot any, please
point them out .

Anyway, I hope you now feel a lot more informed about the ways of AI
scripting, and I hope to see some AI based projects from you soon

- Wok

Wok?

[This message has been edited by Gen_Rhys_Dallows (edited 03-08-2019 @ 11:12 PM).]

AuthorReplies:
Dark Jedi
Clone Trooper
posted 02-01-03 04:44 PM EDT (US)     1 / 188       
Ok, i've said about Wok being helpfull, and look now, he goes off and helps us even more! A great guide there Wok! I will try this a.s.a.p!
Wok
Clone Trooper
posted 02-01-03 04:46 PM EDT (US)     2 / 188       
Thanks, Dark Jedi Hopefully you'll learn something from it.

(And please, notice the irony of me making a spelling error in the very sentence where I was asking you to point out spelling errors )

Oh, and may I add a huge thanks to Angel AoErat for posting this for me, and for sticking it


Wok?

[This message has been edited by Wok (edited 02-01-2003 @ 04:53 PM).]

Crazed Ewok
Mectator
(id: The Crazed Ewok)
posted 02-01-03 04:47 PM EDT (US)     3 / 188       
wow...toooooooo many stickys

C hairman of the FMT, Mectator, and Seraph
r esident of Unity RPG, Anti-Heroes, and Indolents
a seraph at SWGBH and EAWH
z apping spammers and stealing their shoes
e w o k "Don't waste your breath trying to figure out my logic" - Seacker
d ependent on daily tea infusions
Echuu
Jedi Padawan
(id: Master Echuu)
posted 02-01-03 06:31 PM EDT (US)     4 / 188       
One word for you Wok.....WOW!

Are you looking to get promoted?

Just Kidding, great guide!

The Mace
Jedi Knight
(id: mace windu9d9)
posted 02-01-03 06:51 PM EDT (US)     5 / 188       
Excellent guide Wok. Youve just made the dreams of many a forummer come true . Good Job


PS $10 says the AI dl section gets flooded


Mace

[This message has been edited by mace windu9d9 (edited 02-01-2003 @ 06:59 PM).]

The Mace
Jedi Knight
(id: mace windu9d9)
posted 02-01-03 07:52 PM EDT (US)     6 / 188       
Whats the identifier for the nova and food processng stations?

Mace
Obese
OD Core Group
posted 02-01-03 08:12 PM EDT (US)     7 / 188       
Very good, Mister Wok. You're finally being useful.

Ahem, just kidding.


Obese
OD Core Group
Location: Maine, USA
Kongou Dess
Moff
(id: Moff Yittreas)
posted 02-01-03 10:02 PM EDT (US)     8 / 188       
HALLELUJAH! HALLELUJAH! HAL-LELUJAH! HAL-LELUJAH! HA-LLE-LU-JAH! Thank you Wok! But, I could of pulled this from the AoK guide. What are the units names?

New RPG Coming Soon | Purveyor of the Poi | Weeaboo Brony Conserative - The Ultimate Foe to the Internet
Lord Sipia: "THIS IS WHAT HAPPENS WHEN SIPPY IS EXCLUDED! EVERYBODY LOSES THEIR SANITY" | Also Lord Sipia: "...Of course. Prepare the butter."
Hi, I'm Kongou! Are you my admiral?
Wok
Clone Trooper
posted 02-02-03 03:17 AM EDT (US)     9 / 188       
Hi guys. Sorry I didn't include a unit/building list in the guide. I'm going to get to work on one right now

mace windu9d9:

The nova processing center is: BLDG-DROPNOVA

The food processing center is: BLDG-DROPCHOW

The ore processing center is: BLDG-DROPMETAL

The carbon processing center is: BLDG-DROPCARBON

Until I get the list up, just ask me the name of a particular unit/building and I'll do my best to answer.


Wok?
bm20950
Banned
posted 02-02-03 05:03 AM EDT (US)     10 / 188       
Youve done it again wok. Great guide
Wok
Clone Trooper
posted 02-02-03 09:05 AM EDT (US)     11 / 188       
Okay, here's most of the unit and building identifiers. I've probably missed some, so I'll look again before I edit the original post. If you see anything I've missed, please say


Buildings:

BLDG-PREFAB - Prefab Shelter
BLDG-MAIN - Command Center
BLDG-DROPANIM - Animal Nursery
BLDG-TRAINTROOPER - Troop Center
BLDG-TRAINAIR - Airbase
BLDG-DROPCARBON - Carbon Proc. Center
BLDG-DROPCHOW - Food Proc. Center
BLDG-GOVTCTR - Fortress
BLDG-TRAINHEAVY - Heavy Weapons Factory
BLDG-TRAINJEDI - Jedi Temple
BLDG-TRAINMECH - Mech Factory
BLDG-MONUMENT - Monument
BLDG-DROPNOVA - Nova Proc. Center
BLDG-DROPMETAL - Ore Proc. Center
BLDG-RESCTR - Research Center
BLDG-TRAINBOAT - Shipyard
BLDG-SPACEPORT - Spaceport
BLDG-BARRIER-LINE - Wall
BLDG-GATE - Gate
BLDG-MISSILE-LINE - Missile Turret
BLDG-TURRET-LINE - Turret
BLDG-WARCTR - War Center
BLDG-FARM - Farm
BLDG-POWERCORE - Power Core
BLDG-SHLDGEN - Shield Generator

Units:

UNIT-AAFTRA - A-Wing (Rebels Only)
UNIT-FIGHTER-LINE - Fighter
UNIT-BOMBER-LINE - Bomber
UNIT-AIRTRANS-LINE - Air Transport
UNIT-AIR-CRUISER - Air Cruiser
UNIT-AIRSPEEDER-LINE - Air Speeder (Rebels Only)
UNIT-DARKTRP-LINE - Dark Trooper (Empire Only)
UNIT-KNIGHT-LINE - Royal Crusader (Naboo Only)
UNIT-BERSERK-LINE - Berserker (Wookiees Only)
UNIT-SHIELD-LINE - Faamba Shield Generator (Gungans Only)
UNIT-DESTDROID-LINE - Destroyer Droid (Trade Federation Only)
UNIT-JEDIFGT-LINE - Jedi Starfighter (Republic Only)
UNIT-GEOFLYR-LINE - Geonosian Warrior (Confederacy Only)
UNIT-BOUNTY - Bounty Hunter
UNIT-PACKED1 - Cannon
SIEGE-ARTILLERY-LINE - Artillery
SIEGE-RAM-LINE - Pummel
SIEGE-MISSILE-LINE - Anti-Air Mobile
UNIT-WORKER - Worker
UNIT-MEDIC - Medic
UNIT-JEDI-LINE - Jedi Padawan/Knight
UNIT-JEDI4 - Jedi Master
UNIT-MECH1-LINE - Strike Mech
UNIT-MECH2-LINE - Mech Destroyer
UNIT-MECH3-LINE - Assault Mech
BOAT-LASER-LINE - Frigate
BOAT-CUTLASER-LINE - Destroyer
BOAT-MISSILE-LINE - Anti Air Boat
BOAT-ARTILLERY-LINE - Cruiser
BOAT-TRANSPORT - Transport Ship
BOAT-WORKER - Utility Trawler
UNIT-LASER-LINE - Trooper
UNIT-MOUNTED-LINE - Mounted Trooper
UNIT-MISSILE-LINE - Anti Air Trooper
UNIT-GRENTRP - Grenade Trooper


Wok?

[This message has been edited by Wok (edited 02-02-2003 @ 11:01 AM).]

Kongou Dess
Moff
(id: Moff Yittreas)
posted 02-02-03 09:17 AM EDT (US)     12 / 188       
*Kisses Wok's feet*
*Coughs up Wookie fur*

New RPG Coming Soon | Purveyor of the Poi | Weeaboo Brony Conserative - The Ultimate Foe to the Internet
Lord Sipia: "THIS IS WHAT HAPPENS WHEN SIPPY IS EXCLUDED! EVERYBODY LOSES THEIR SANITY" | Also Lord Sipia: "...Of course. Prepare the butter."
Hi, I'm Kongou! Are you my admiral?
The Mace
Jedi Knight
(id: mace windu9d9)
posted 02-02-03 10:07 AM EDT (US)     13 / 188       
Thanks Wok!

Mace
OngoingWalnut
Clone Trooper
posted 02-02-03 02:28 PM EDT (US)     14 / 188       
GHAA call me a nOOb, but Im having trouble...

Quote:

What next?

You've got your .per file and saved it to the right directory, but there's
one more step that you need to take before the computer will recognise the
AI script in-game. This step, however, is much easier. Open up NotePad and
create a new document. Then, without typing anything, save it as
myfirstai.ai. If you saved your .per file under a different name to
myfirstai, then just save the .ai file under the same name as that, instead.
They must have the same name apart from the .ai and .per endings. Save the
.ai file to the same directory as you did the .per file (SWGB/Game/AI). The
.ai file doesn't at all affect the script, it just tells the computer that
there should be a script called samenameasdotaifile.per in the AI folder.

I cant get this to work, the .ai file icon is a windows sign on a piece of paper...and the game won't recognise it so I get the error message!

GHAAAAAAAAA!

!*&$@$#&^##%@^&##$@$EXPLETIVE%$#!$##^%@@#!$%#!

help...me....

<UPDATE> GHA STUPID THING! now I got the .ai file to have a text doc icon...but I need the windows paper icon to have the name "myfirstai" on my random map screen...why can't I get past the first stinking PART!??!?!</UPDATE>


Now I know why your mother called ya nutzy!!! - Deadeye

Nuts crack up easily....

[This message has been edited by OngoingWalnut (edited 02-02-2003 @ 03:01 PM).]

Crazed Ewok
Mectator
(id: The Crazed Ewok)
posted 02-02-03 02:44 PM EDT (US)     15 / 188       
hmm...Wok...yousa trying to be a moderasa, hmm? Who bent the rules to let you use HTML? *continues questioing him*

C hairman of the FMT, Mectator, and Seraph
r esident of Unity RPG, Anti-Heroes, and Indolents
a seraph at SWGBH and EAWH
z apping spammers and stealing their shoes
e w o k "Don't waste your breath trying to figure out my logic" - Seacker
d ependent on daily tea infusions
Wok
Clone Trooper
posted 02-02-03 02:50 PM EDT (US)     16 / 188       

Quote:

I cant get this to work, the .ai file icon is a windows sign on a piece of paper...and the game won't recognise it so I get the error message!

Try right-clicking on the file and going to properties. Then select the "Opens With" button and change it to NotePad.

Quote:

Who bent the rules to let you use HTML? *continues questioing him*

I already said, Angel AoErat put it in for me.


Wok?
OngoingWalnut
Clone Trooper
posted 02-02-03 03:04 PM EDT (US)     17 / 188       
OOh! two replys in an hour!

just in case you didn't see teh new addition I just added to my last post..here it is:

<UPDATE> GHA STUPID THING! now I got the .ai file to have a text doc icon...but I need the windows paper icon to have the name "myfirstai" on my random map screen...why can't I get past the first stinking PART!??!?!</UPDATE>

do you have MSN Messenger wok? maybe I could ask you there...


Now I know why your mother called ya nutzy!!! - Deadeye

Nuts crack up easily....

Wok
Clone Trooper
posted 02-02-03 03:39 PM EDT (US)     18 / 188       
Uh... I'm not quite sure I fully understand your question

Yeah, I have MSN. My details are in my profile


Wok?
Kongou Dess
Moff
(id: Moff Yittreas)
posted 02-02-03 04:11 PM EDT (US)     19 / 188       
What about research items WOk?

New RPG Coming Soon | Purveyor of the Poi | Weeaboo Brony Conserative - The Ultimate Foe to the Internet
Lord Sipia: "THIS IS WHAT HAPPENS WHEN SIPPY IS EXCLUDED! EVERYBODY LOSES THEIR SANITY" | Also Lord Sipia: "...Of course. Prepare the butter."
Hi, I'm Kongou! Are you my admiral?
Wok
Clone Trooper
posted 02-02-03 04:20 PM EDT (US)     20 / 188       
I'm working on it

Wok?
Kongou Dess
Moff
(id: Moff Yittreas)
posted 02-02-03 04:26 PM EDT (US)     21 / 188       
You don't know?!

New RPG Coming Soon | Purveyor of the Poi | Weeaboo Brony Conserative - The Ultimate Foe to the Internet
Lord Sipia: "THIS IS WHAT HAPPENS WHEN SIPPY IS EXCLUDED! EVERYBODY LOSES THEIR SANITY" | Also Lord Sipia: "...Of course. Prepare the butter."
Hi, I'm Kongou! Are you my admiral?
Wok
Clone Trooper
posted 02-02-03 04:29 PM EDT (US)     22 / 188       
To make a list, I need to extract them all from the game AI files, which could take a while, especially since I don't always know what exactly I'm looking for. However, I will do it soon

Wok?
Kongou Dess
Moff
(id: Moff Yittreas)
posted 02-02-03 04:34 PM EDT (US)     23 / 188       
I'd be lying if I said I envy you , Wok.

New RPG Coming Soon | Purveyor of the Poi | Weeaboo Brony Conserative - The Ultimate Foe to the Internet
Lord Sipia: "THIS IS WHAT HAPPENS WHEN SIPPY IS EXCLUDED! EVERYBODY LOSES THEIR SANITY" | Also Lord Sipia: "...Of course. Prepare the butter."
Hi, I'm Kongou! Are you my admiral?
Kongou Dess
Moff
(id: Moff Yittreas)
posted 02-02-03 05:03 PM EDT (US)     24 / 188       
What is Ecsrow?

New RPG Coming Soon | Purveyor of the Poi | Weeaboo Brony Conserative - The Ultimate Foe to the Internet
Lord Sipia: "THIS IS WHAT HAPPENS WHEN SIPPY IS EXCLUDED! EVERYBODY LOSES THEIR SANITY" | Also Lord Sipia: "...Of course. Prepare the butter."
Hi, I'm Kongou! Are you my admiral?
OngoingWalnut
Clone Trooper
posted 02-02-03 07:14 PM EDT (US)     25 / 188       
I dont know...probably some alien or something..

gha...k ill tell you on msn, I added u to my friends list.


PLEASE NOTE! THIS IS NOT SPAM! THIS IS A FUNNY REMARK TO MOFF YITTREAS AND A ACKNOWLEDGEMENT TO WOK. IF ANY MODORATOR CALLS THIS SPAM, I WILL SUE FOR ABUSE OF POWER!

<edit> SEE! I EVEN EDITED MY OWN POST TO CUT DOWN ON SPAM!

thank you kindly...

</edit>


Now I know why your mother called ya nutzy!!! - Deadeye

Nuts crack up easily....

[This message has been edited by OngoingWalnut (edited 02-02-2003 @ 07:16 PM).]

Kongou Dess
Moff
(id: Moff Yittreas)
posted 02-02-03 07:44 PM EDT (US)     26 / 188       
I don't have MSN. What is it? And in this script, what is the invalid identifier:
(defrule            (carbon-amount  >=  160)            =>            (build BLDG-TRAINTROOPER))(defrule            (carbon-amount >= 200)            =>            (build BLDG-POWERCORE))(defrule            (carbon-amount >= 1050)           (food-amount >= 1000)             =>            (build BLDG-PREFAB)            (build BLDG-PREFAB)            (build BLDG-PREFAB)            (build BLDG-PREFAB)            (build BLDG-PREFAB)            (train UNIT-WORKER)             (train UNIT-WORKER)             (train UNIT-WORKER)             (train UNIT-WORKER)             (train UNIT-WORKER)             (train UNIT-WORKER)             (train UNIT-WORKER)             (train UNIT-WORKER)             (train UNIT-WORKER)             (train UNIT-WORKER)             (train UNIT-WORKER)             (train UNIT-WORKER)             (train UNIT-WORKER)             (train UNIT-WORKER)             (train UNIT-WORKER)            (build BLDG-DROPANIM)            (build BLDG-DROPCARBON)            (train UNIT-LASER-LINE)            (train UNIT-LASER-LINE)            (train UNIT-LASER-LINE)            (train UNIT-LASER-LINE)            (train UNIT-LASER-LINE)            (train UNIT-LASER-LINE)            (train UNIT-LASER-LINE)            (train UNIT-LASER-LINE)            (train UNIT-LASER-LINE)            (train UNIT-LASER-LINE)            (train UNIT-MEDIC)            (train UNIT-MEDIC)            (train UNIT-MEDIC)            (train UNIT-MEDIC)            (train UNIT-MEDIC)            (build BLDG-DROPCHOW)            (build BLDG-FARM)            (build BLDG-FARM))(defrule            (food-amount >= 500)            =>            (resign))  

New RPG Coming Soon | Purveyor of the Poi | Weeaboo Brony Conserative - The Ultimate Foe to the Internet
Lord Sipia: "THIS IS WHAT HAPPENS WHEN SIPPY IS EXCLUDED! EVERYBODY LOSES THEIR SANITY" | Also Lord Sipia: "...Of course. Prepare the butter."
Hi, I'm Kongou! Are you my admiral?

[This message has been edited by Moff Yittreas (edited 02-03-2003 @ 08:54 AM).]

OngoingWalnut
Clone Trooper
posted 02-02-03 08:30 PM EDT (US)     27 / 188       
MSN is a Instant Messenging Program from: MSN (Duh)
Here's the link: http://messenger.msn.com/default.asp?client=1

Now I know why your mother called ya nutzy!!! - Deadeye

Nuts crack up easily....

Wok
Clone Trooper
posted 02-03-03 01:48 AM EDT (US)     28 / 188       
Moff, try putting [code][/code] tags around the script. It will make it easier to read

If you have an invalid identifier, and you start the game, it should give you an error message and tell you which identifier is invalid.


Wok?
Kongou Dess
Moff
(id: Moff Yittreas)
posted 02-03-03 08:58 AM EDT (US)     29 / 188       
Uhhh, Wok? IT ATE MY SCRIPT!!!!!!

New RPG Coming Soon | Purveyor of the Poi | Weeaboo Brony Conserative - The Ultimate Foe to the Internet
Lord Sipia: "THIS IS WHAT HAPPENS WHEN SIPPY IS EXCLUDED! EVERYBODY LOSES THEIR SANITY" | Also Lord Sipia: "...Of course. Prepare the butter."
Hi, I'm Kongou! Are you my admiral?
Aftermath
HG Alumnus
posted 02-03-03 11:04 AM EDT (US)     30 / 188       
Yittreas - be quiet, you should be nice to Wok if you expect any help.

Great guide Wok, job well done


A f t y

A A R S

:: The Sun always rises in the East :: Flawless Crowns :: Dancing Days ::

"We kissed the Sun, and it smiled down upon us."
« Previous Page  1 2 3 ··· 7  Next Page »
You must be logged in to post messages.
Please login or register

Hop to:    

SWGB Heaven | HeavenGames