# I prefer the #-sign as a remark line, rather then // or;
BEGIN InitProc
# to keep it simple, i think we should use BEGIN...END blocks, so ANYone can understand them
# also, CaSe should not matter, like in pascal or basic
CReaTeUnit ( 1, 1, mapLynx, mapLaser )
# of course the in-script coordinates will NOT be offset with (31,-1)
END
# ----------------------------
# == Example AI SCRIPT file ==
# ----------------------------
# ------------------
# Set mission params
# ------------------
SET PLAYERS=4
SET MAP="eden04.map"
SET MAXTECHLEVEL=12
SET STARTTECH=2
# ---------------------
# Create mining beacons
# ---------------------
COMMON BEACON ( 40, 18, 2BAR, variant1)
COMMON BEACON ( 19, 44, 2BAR, variant3)
RARE BEACON ( 36, 31, 3bar, Variant2)
# ---------------
# Create AI bases
# ---------------
# This is player one's base
# The CONNECT keyword connects the building to the CC
BEGIN FIXED BASE 1
UNIT (CommandCenter, 52, 6)
UNIT (StructureFactory,52,12, agridome, residence) CONNECT
UNIT (CommonSmelter, 46,12) CONNECT
UNIT (MINE, 40,18)
UNIT (tokamak, 56, 3)
UNIT (convec, 48,10)
UNIT (cargotruck,42,15)
UNIT (cargotruck,44,16)
END
# This is player two's base
BEGIN FIXED BASE 2
UNIT (CommandCenter, 23,54)
UNIT (StructureFactory,28,54) CONNECT
UNIT (CommonSmelter, 23,48) CONNECT
UNIT (MINE, 19,44)
UNIT (tokamak, 16,60)
UNIT (convec, 28,60, agridome)
UNIT (cargotruck,19,47)
UNIT (cargotruck,20,49)
END
Unit Mine, 19, 44
# ----------------------------
# == Example AI SCRIPT file ==
# ----------------------------
SET NAME="Example"
# ------------------
# Set mission params
# ------------------
SET PLAYERS=4
SET MAP="eden04.map"
SET MAXTECHLEVEL=12
SET STARTTECH=2
# ---------------------
# Create mining beacons
# ---------------------
COMMON BEACON 40, 18, 2BAR, variant1
COMMON BEACON 19, 44, 2BAR, variant3
RARE BEACON 36, 31, 3bar, Variant2
# ---------------
# Create AI bases
# ---------------
# This is player one's base
# The CONNECT keyword connects the building to the CC
BEGIN FIXED BASE 1
UNIT CommandCenter, 52, 6
CONNECT UNIT StructureFactory,52,12, agridome, residence
CONNECT UNIT CommonOreSmelter,46,12
UNIT MINE, 40,18
UNIT tokamak, 56, 3
UNIT convec, 48,10
UNIT cargotruck,42,15
UNIT cargotruck,44,16
END
# This is player two's base
BEGIN FIXED BASE 2
UNIT CommandCenter, 23,54
CONNECT UNIT StructureFactory,28,54
CONNECT UNIT CommonOreSmelter,23,48
UNIT MINE, 19,44
UNIT tokamak, 16,60
UNIT convec, 28,60, agridome
UNIT cargotruck,19,47
UNIT cargotruck,20,49
END
Hum... Look, Eddy, I don't have much to say yet but as of now I have two things:I'm planning to, Jgamer. I've already created a quickhelp file: you will find this along with the downloaded zip: it's a 1-liner help, that shows when you focus on a scripting error and press F1.
First: I suggest that you start right now with a 'syntax manual' showing what exactly each command does. It's vital
Second: I still think that Beacon Common is better than Common Beacon, but that must be only meIt's only a minor adjustment.. i'll add both, like i did with the comments
UNIT agridome AT 15,32
create UNIT=structurefactory LOCATION=15,32 CARGO=Agridome,CommandCenter,residence
If its not too late for further suggestions...consider it done
the parameter lists of some functions are long and probably hard to remember. Why not change it to somethin likeCode: [Select]UNIT agridome AT 15,32
or probablyhmm.. i have to think about this.Code: [Select]create UNIT=structurefactory LOCATION=15,32 CARGO=Agridome,CommandCenter,residence
Create unit CargoTruck at 20,30 with cargo CommonMetals with rotation 0 with lights on.
Create player 1 with 2000 common with 1000 rare with 10 scientists with 10 workers with 10 kids with 1 satellite.
Create player 1 with common=2000, rare=1000, scientists=10, workers=10, kids=10, satellites=1.
#define MyIncrediblyLongMacro somethinghere \
a = b; \
a++; \
b--;
[18:40] <Mcshay> is it volcano or vulcano?
[18:40] <Mcshay> the proper spelling that is
[18:40] <Sirbomber> Volcano.
[18:41] <Mcshay> eddy uses VULCANO in his scripter
Some other notes I want to make about game limitations:That doesn't matter much, since Oupost uses 8.3 filennames, so i have to check for 8 characters on name, and 8.3 on mapname
I was poking thru the code today, and it appears that an AIModDesc (the structure that holds some DLL data like MapName, LevelDesc, etc) places some limits on the length of those strings.
There is a maximum of 16 bytes for both the MapName and the TechtreeName (this includes the null-terminator, so the user shouldn't be allowed to type more than 15 chars)
And then on the LevelDesc, a max of 48 bytes (so 47 chars).I'll put that into scripter tonight.
Thus you should put limits to be sure the user can't exceed these..