Welcome! Please Login or Register!
April 26, 2024, 12:13:24 AM
Home Login Register
pftq Forums  |  Game Design  |  Age of Empires III  |  Castle Blood  |  Scripting Questions 0 Members and 1 Guest are viewing this topic. « previous next »
Latest News!Lunar Trigger(Aug 27, 2023)
Pages: [1] 2 3 4 Print
Author Topic: Scripting Questions  (Read 17857 times)
River_God
Member
*****
Offline Offline



Posts: 184

« on: March 26, 2008, 01:09:06 PM »

Sorry to add two topics, I didn't want to ask questions to you and take suggestions in the same topic, it would get long for people reading it.

I have done some simple things to the script, and came across this line:

int civSpanish = 1; int civBritish = 2; int civFrench = 3; int civPortuguese = 4; int civDutch = 5; int civRussian = 6; int civGerman = 7; int civOttoman = 8; int civAztec=17; int civSioux=16; int civIroquois=15;

is there a specific reason Aztec is 17, etc. Or can I use whatever numbers I feel like? I mean I understand why Spanish is 1 and British is 2, but why jump to 17 all of a sudden?
« Last Edit: March 26, 2008, 07:11:06 PM by pftq » Logged

"I am not sure why people are so afraid of new ideas, I am afraid of the old ones"   :p
pftq
Administrator
*****
Offline Offline



Posts: 4198

WWW
« Reply #1 on: March 26, 2008, 07:09:45 PM »

Those numbers are the ids of the civs hardcoded into the game.  I did not choose those numbers.  It was just easier to type civGerman than remember than Germans were always 7. Smiley

Yes, you will have to figure out what the IDs for the new civs are.  It's also possible that old IDs no longer work as that was the case for TWC.
« Last Edit: March 26, 2008, 07:14:37 PM by pftq » Logged
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #2 on: March 27, 2008, 01:01:20 PM »

wouldn't it be easier to use  rmGetCivID("Russians"), because I have no idea how to find the number. So that would look like:

int civSpanish=rmGetCivID("Spanish")

unless it lags, then I could find a way to get those numbers.
Logged

"I am not sure why people are so afraid of new ideas, I am afraid of the old ones"   :p
pftq
Administrator
*****
Offline Offline



Posts: 4198

WWW
« Reply #3 on: March 27, 2008, 04:15:08 PM »

You cannot use rm functions before the main void section.  It also just gives the computer more to calculate and takes up scripting space.
Logged
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #4 on: March 28, 2008, 11:58:48 AM »

ok, I'll get those numbers.
Logged

"I am not sure why people are so afraid of new ideas, I am afraid of the old ones"   :p
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #5 on: April 22, 2008, 03:53:17 PM »

Just to confirm, the "TheName" function, it is used to help with lag (probly more direct) but also so it's faster for the instructions text to have the name? If so, do I really need to add all the Asian units or just the one's I am using?
Logged

"I am not sure why people are so afraid of new ideas, I am afraid of the old ones"   :p
pftq
Administrator
*****
Offline Offline



Posts: 4198

WWW
« Reply #6 on: April 22, 2008, 10:09:38 PM »

No, TheName function just gets the display name of the unit.  Units in RMS if you remember use protonames.  You would not want that being displayed to players.
Logged
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #7 on: April 23, 2008, 01:16:53 PM »

So if I just add TheName for the units I use it should be fine?
Logged

"I am not sure why people are so afraid of new ideas, I am afraid of the old ones"   :p
pftq
Administrator
*****
Offline Offline



Posts: 4198

WWW
« Reply #8 on: April 23, 2008, 10:59:19 PM »

Yes.  You mean add the units to the TheName function correct?

Make sure it's case sensitive and exact format as well.
Logged
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #9 on: April 24, 2008, 11:44:48 AM »

Yes I meant adding the units and buildings to the TheName function, and I will replicate your format with impeccable accuracy. Tongue
Logged

"I am not sure why people are so afraid of new ideas, I am afraid of the old ones"   :p
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #10 on: April 24, 2008, 02:13:17 PM »

Ok, I am pretty much done except it cannot load, and I have tried without anoything added and it still failed. I am thinking either you added something to make it fail so I could not send it out without you, or there is something in your code for TWC not allowed in TAD. If it's the latter, any suggestions as to where?
Logged

"I am not sure why people are so afraid of new ideas, I am afraid of the old ones"   :p
pftq
Administrator
*****
Offline Offline



Posts: 4198

WWW
« Reply #11 on: April 24, 2008, 05:36:35 PM »

Unlikely that TAD's code changed enough to not allow TWC code (otherwise AOE3 random maps and TWC maps would not load).  Original maps worked fine in TWC.

Doublecheck your code - small errors make all the difference.
Logged
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #12 on: April 25, 2008, 08:19:28 AM »

the thing is I checked your code and it didn't work. I wil double check to make sure I didn't add anything to that file but there was something wrong with the code you gave me.
Logged

"I am not sure why people are so afraid of new ideas, I am afraid of the old ones"   :p
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #13 on: April 25, 2008, 08:36:08 AM »

Ok, you were right, yours works (except for techs of course). I think this may be the problem, because I never fully understood format for it:

   var3 = rmCreateObjectDef("FortI"+i);
/*RG*/   varx1="FortFrontier";
   rmAddObjectDefToClass(var3, clForts);
   rmAddObjectDefItem(var3,"HotAirBalloon",1,0.0);
   rmPlaceObjectDefAtAreaLoc(var3,i,rmAreaID("PlayerBridge"+i+"_1"),1);
/*RG*/   if(rmGetPlayerCiv(i)==civIndians) varx1="ypAgraFort";
/*_RG*/   else changeunit(""+var3, varx1);
   
It's the else statement I think is wrong.
Logged

"I am not sure why people are so afraid of new ideas, I am afraid of the old ones"   :p
River_God
Member
*****
Offline Offline



Posts: 184

« Reply #14 on: April 25, 2008, 12:39:51 PM »

Wait a minute, I don't need the else there. Fixed it, still not loading, will take a harder look at whta I typed.
Logged

"I am not sure why people are so afraid of new ideas, I am afraid of the old ones"   :p
Pages: [1] 2 3 4 Print 
pftq Forums  |  Game Design  |  Age of Empires III  |  Castle Blood  |  Scripting Questions « previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines | RSS Feed Valid XHTML 1.0! Valid CSS!
Page created in 0.108 seconds with 22 queries.