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

Scenario Design
Moderated by MosheLevi, Mister SCP

Hop to:    
Welcome! You are not logged in. Please Login or Register.735 replies, Sticky
Age of Empires III Heaven » Forums » Scenario Design » The RMS question Thread
Bottom
Topic Subject:The RMS question Thread
« Previous Page  1 ··· 8 9 10 11 12 ··· 20 ··· 30  Next Page »
RF_Gandalf
Skirmisher
posted 04-27-06 06:09 AM EDT (US)         
This thread is intended for discussion of questions regarding Random Map Scripting for AOE3. Instead of posting questions separately in the forum, use this thread which will serve as a collection of (?)wisdom for those looking for information. I will be checking this thread at least several times per week, and I hope that the other experienced scripters will join in to add their wisdom.

For those seeking some basic starting help, try these links to some helpful information:
The Age of Wiki has a useful section on Random Map Scripting.

An AOE3RMS Tutorial by MOnTy PyThOn is a pretty complete guide to help you understand the various commands.

Finally, try downloading some of the map scripts at the Age of Empires IIIHeaven RMS Download section and open the map scripts in a text editor and check them out to see how it is done. You could also open the map scripts that came with the game to study their commands; these will be found in the directory: Program Files\Microsoft Games\Age of Empires III\rm.

So post any RMS questions here, we will try to help!

AuthorReplies:
rush_frantic
Skirmisher
posted 08-08-07 07:40 PM EDT (US)     226 / 735       
actually i feel quite stupid now because i searched for it in the wiki^^

thx very much, i will try that out
Orca
Skirmisher
posted 08-09-07 07:52 AM EDT (US)     227 / 735       
Somewhere in teh Downloadsection there is a program called AoE3ED which is able to convert .tga into .ddt
The images have to be size power of two, e.g. 256 X 512

[This message has been edited by Orca (edited 08-09-2007 @ 07:52 AM).]

Felix Hermansson
Skirmisher
posted 08-15-07 04:35 AM EDT (US)     228 / 735       
Is ther something else wrong with the trigger?
Is there something in the game that overcomes this trigger, keeping it from working?
I've been on vacation, so I haven't been able to look into this yet. Did you solve the problem in the meantime?
RF_Gandalf
Skirmisher
posted 08-16-07 08:34 PM EDT (US)     229 / 735       
No, the 'limit age advancement' problem was not solved. After trying the advice given here, I corresponded a little with some ES people, and the advice given by 'the map designers' was to try to disable the politicians. I have tried that in ways similar to the triggers I posted above - listing each of the politicians (council members for natives) used to advance to the industrial age, doing it as all politicians for each player and then a different trigger listing by civ, but neither method worked. I am waiting to hear back from them for other ideas. Have you seen the tech list whichb includes the politicians? Took a good while to to thru it and find them all, and then there are things that are weird in the list - for example, most of the techs are civ-specific, such as this one -
int UnlockPoliticianViceroyGerman=36;
However, there are 2 german viceroy techs, there are none for British and a few others, but there is a 'generic' viceroy tech. The 'KingsMusketeeer' politician is listed sometimes as just 'Musketeer', there is a generic 'engineer' tech for some of the civs, there are 2 techs for several other politicians. So I tried to include all of them in the triggers.
Here, I will post the one trigger I used, listing by civ (note I labeled these to try to make sence myself out of it):

for(i=1; <cNumberPlayers)
{
// Create trigger
rmCreateTrigger("LimitAgePlayer"+i);

// Switch to trigger
rmSwitchToTrigger(rmTriggerID("LimitAgePlayer"+i));

// Set basic trigger options
rmSetTriggerActive(true);
rmSetTriggerLoop(false);
rmSetTriggerRunImmediately(true);
rmSetTriggerPriority(2);

// Set trigger conditions
rmAddTriggerCondition("Always");

// Set trigger effects

if (rmGetPlayerCiv(i) == rmGetCivID("Russians"))
{
rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 66); // russ warminister
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 560); // russ kings musketeer
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 564); // russ musketeer
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 415); // generic engineer
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 48); // russ cavalier
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 559); // other russ cavalier
rmSetTriggerEffectParam("Status", "Unobtainable");
}
else if (rmGetPlayerCiv(i) == rmGetCivID("French"))
{
rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 555); // fr musketeer
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 67); // french cavalier
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 415); // generic engineer
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 416); // generic tycoon
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 554); // other french cavalier
rmSetTriggerEffectParam("Status", "Unobtainable");
}
else if (rmGetPlayerCiv(i) == rmGetCivID("British"))
{
rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 551); // br viceroy
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 61); // br kings musketeer
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 62); // br engineer
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 416); // generic tycoon
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 552); // br musketeer
rmSetTriggerEffectParam("Status", "Unobtainable");
}
else if (rmGetPlayerCiv(i) == rmGetCivID("Dutch"))
{
rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 591); // dutch viceroy
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 29); // other dutch viceroy
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 588); // dutch musketeer
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 416); // generic tycoon
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 30); // dutch cavalier
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 585); // other dutch cavalier
rmSetTriggerEffectParam("Status", "Unobtainable");
}
else if (rmGetPlayerCiv(i) == rmGetCivID("Spanish"))
{
rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 43); // sp warminister
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 434); // other sp warminister
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 427); // sp musketeer
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 45); // sp engineer
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 431); // sp cavalier
rmSetTriggerEffectParam("Status", "Unobtainable");
}
else if (rmGetPlayerCiv(i) == rmGetCivID("Germans"))
{
rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 36); // german viceroy
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 564); // other german viceroy
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 37); // german engineer
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 416); // generic tycoon
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 563); // german cavalier
rmSetTriggerEffectParam("Status", "Unobtainable");
}
else if (rmGetPlayerCiv(i) == rmGetCivID("Portuguese"))
{
rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 574); // port viceroy
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 573); // port engineer
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 50); // port engineer
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 575); // port musketeer
rmSetTriggerEffectParam("Status", "Unobtainable");
}
else if (rmGetPlayerCiv(i) == rmGetCivID("Ottoman"))
{
rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 586); // otto cavalier
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 39); // otto grand vizier
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 415); // generic engineer
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 38); // otto tycoon
rmSetTriggerEffectParam("Status", "Unobtainable");
}
else if (rmGetPlayerCiv(i) == rmGetCivID("xpIroquois"))
{
rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 1034);
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 1038);
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 1042);
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 1046);
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 1050);
rmSetTriggerEffectParam("Status", "Unobtainable");
}
else if (rmGetPlayerCiv(i) == rmGetCivID("xpAztec"))
{
rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 1018);
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 1023);
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 1027);
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 1031);
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 1035);
rmSetTriggerEffectParam("Status", "Unobtainable");
}
else if (rmGetPlayerCiv(i) == rmGetCivID("xpSioux"))
{
rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 1039);
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 1043);
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 1047);
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 1051);
rmSetTriggerEffectParam("Status", "Unobtainable");

rmAddTriggerEffect("Set Tech Status");
rmSetTriggerEffectParamInt("PlayerID", i);
rmSetTriggerEffectParamInt("TechID", 1055);
rmSetTriggerEffectParam("Status", "Unobtainable");
}
} // end trigger


And the second trigger attempt just put each of these politician techs together for each player without dividing by civ.

Any other ideas? Any evident problems with my trigger?
nottud
Skirmisher
posted 08-16-07 08:48 PM EDT (US)     230 / 735       
Although I don't have the game - I don't know how removing politicians will change the age limit. What about if when you get to the last age, it sets you back to age 1 again?

The boy with the mad imagination
Prepare for the ultimate duel!
Learn to use all my triggers and what you can do with them. Visit here.
Find out and download the transform trigger here.
Play some minigames I have created outside AOM including some 3D games here.
RF_Gandalf
Skirmisher
posted 08-16-07 09:16 PM EDT (US)     231 / 735       
nottud - In this game, you advance to the next age at a screen where you select a 'politician' who gives you certain benefits. If you have AOM, it is very much like selecting a minor god to get to one of the next ages. I suppose that if all of the politicians could not be selected then you could not advance.
dhplante
Skirmisher
posted 08-27-07 07:29 PM EDT (US)     232 / 735       
To RF_Gandalf:

Just a word...i want to congratulate you...
for your winning...in the dakota contest...

dany
Cyclohexane
Skirmisher
posted 09-07-07 05:53 PM EDT (US)     233 / 735       
Edit: Removed

Lead, Follow, or Get the Hell out of the way!................CYCLOHEXANE'S FREE GUIDES:

-TAD GUIDE: AOE3 TWC TAD Quick Reference -or view online: On-line
AOE3 TWC TAD UNIT COMPARISON SPREADSHEET: Unit Comparison Spreadsheet

See other guides, technological advancements, interviewing tips, and more at my website All Things Miscellaneous

[This message has been edited by Cyclohexane (edited 09-08-2007 @ 11:04 AM).]

dhplante
Skirmisher
posted 09-08-07 08:48 PM EDT (US)     234 / 735       
To RF_Gandalf,

could you help me please...
i want to add to my rms a trigger...
i have been reading on the triggers...
but still is a lot confused...
i will tell you what i want to do exactly and
add to my rms map...

i want to put on the map an outpost and a factory and both
will belong to the gaia player...so it will be color gold...
and i want the gaia factory to belong to the player who will
destroy this gaia outpost....

could it be done?
if yes...could you please...
write for me...
the trigger that would be needed...

Many thanks again...
for all the help that you have provided me...
dany...
MosheLevi
Scenario Contest Winner
posted 09-09-07 08:34 AM EDT (US)     235 / 735       
i want to put on the map an outpost and a factory and both
will belong to the gaia player...so it will be color gold...
and i want the gaia factory to belong to the player who will
destroy this gaia outpost....
I can tell you how the triggers are going to look like but you need to figure out how to write it in RMS format.

First I do not know of a way to know who really destroyed the outpost.
Maybe there is a way with the statistics condition but I haven't tried that yet.

Another way to figure that out is to have two set of triggers.
In order for this to work well you will need to place the outpost and factory next to each other.

First you need to determine when the outpost is destroyed.

"Outpost Check"
Trigger: active
Condition: Outpost is Dead
Effect: Fire Event "Check unit Player 1"
Effect: Fire Event "Check unit Player 2"

Then you will check for the "last man standing"

"Check unit Player 1"
Trigger: Not Active
Condition: Units in area "player = 1" "count > 0" "LOS = 20"
.............. Units in area "player = 2" "count = 0" "LOS = 20"
Effect: Convert "Unit = Factory" "Player = 1"

"Check unit Player 2"
Trigger: Not Active
Condition: Units in area "player = 1" "count = 0" "LOS = 20" (from the factory)
.............. Units in area "player = 2" "count > 0" "LOS = 20" (from the factory)
Effect: Convert "Unit = Factory" "Player = 2"

[This message has been edited by MosheLevi (edited 09-09-2007 @ 08:39 AM).]

dhplante
Skirmisher
posted 09-09-07 10:05 AM EDT (US)     236 / 735       
To MosheLevi,

thank you for your help...
i will try it and give you some feedback...

dany...

note:

i have put the Outpost and the Factory...
on the map...
plus copy and paste The lines for the triggers
exactly as you wrote them

and the map is not working...

[This message has been edited by dhplante (edited 09-09-2007 @ 10:24 AM).]

dr nefarious
Skirmisher
posted 09-10-07 05:39 AM EDT (US)     237 / 735       
Dany, I'm not sure if I understand you correctly, but you cannot just copy the lines Moshe gave you above. He just described what's to be done. You'll have to use the correct RMS trigger syntax as shown a bit further above in the posts from Felix and RF_G.

Best have a look at Monty's guide, it features a short introduction to triggers. You can also have a look at maps like Fort Wars or Dogleg Island to see how they are implemented. There are also some King of the Hill style maps around featuring just a few simple triggers which should provide a somewhat easier start.

Note that once you've added the triggers to your code you can check the result in the editor on the generated map using the "Triggers" tab.
MosheLevi
Scenario Contest Winner
posted 09-10-07 06:31 AM EDT (US)     238 / 735       
Dany,

As I said above:
I can tell you how the triggers are going to look like but you need to figure out how to write it in RMS format.
dhplante
Skirmisher
posted 09-10-07 09:12 AM EDT (US)     239 / 735       
To MosheLevi,

Thanks...
dany
erestel
Skirmisher
posted 10-13-07 09:33 PM EDT (US)     240 / 735       
in the ES's "unknown" map, which is my favorite, from time to time the player would come across a native socket that does not work, ie tradepost cannot be built upon, tooltip showing "trade posts must be built at native settlement/trade route".

currently i am playing with the unknown.xs and one of the thing i am doing is to increase the number of sockets to appear on the map. once done, the situation aforementioned worsened, with like half the sockets unusable. is there a way to fix it? thanks
Orca
Skirmisher
posted 10-14-07 05:27 AM EDT (US)     241 / 735       

This appears to be the case if you dont declare the native civs for the map correctly.
Make sure you have all native civs defined along some lines like those :

rmSetSubCiv(0, "Cheyenne");
rmSetSubCiv(1, "Cherokee");
RF_Gandalf
Skirmisher
posted 10-14-07 08:54 PM EDT (US)     242 / 735       
Sometimes trade post sockets cannot be built upon if there is something overlapping. For example on the TWC map California occasionally one of the native TPs are built on a cliff and the TP edge overlaps the cliff edge - it cannot be built on. Also if the TP socket overlaps the map edge or water it may not be built on.
erestel
Skirmisher
posted 10-15-07 11:30 PM EDT (US)     243 / 735       
i double checked the xs file and the rmSetSubCiv is there already. still half the native sites are not usable even by the cpu players. any other ideas?
RF_Gandalf
Skirmisher
posted 10-18-07 07:58 PM EDT (US)     244 / 735       
erestel

Rather than asking us to guess what you did, why don't you post your code here?

Post the whole 'native' section (yes, it is long, but better than a whole map script! ) that you are using in the script.
erestel
Skirmisher
posted 10-18-07 09:20 PM EDT (US)     245 / 735       
alright, here it is. note that it is taken almost 100% from ES's "unknown" map from TWC with just some value changes.
// ============= Choose Natives =============

int ZapotecVillageID = -1;
int CaribsVillageID = -1;
int CherokeeVillageID = -1;
int ComancheVillageID = -1;
int CreeVillageID = -1;
int IncasVillageID = -1;
int KlamathVillageID = -1;
int CheyenneVillageID = -1;
int MayaVillageID = -1;
int NootkaVillageID = -1;
int SeminolesVillageID = -1;
int TupiVillageID = -1;
int NavajoVillageID = -1;
int HuronVillageID = -1;
int MapucheVillageID = -1;

float nativeChance = -1;

// Usually 3 to 4, but rarely more or less
// change note: Changed to usually one of each, rarely more than one

int nativeNumber = rmRandInt(16);
if(rmRandFloat(0,1) < 0.25)
nativeNumber = rmRandInt(17,32);
else if(rmRandFloat(0,1) < 0.15)
nativeNumber = rmRandInt(10,16);
rmEchoInfo("Native number = "+nativeNumber);

// For each native, randomly determine tribe

for(i = 0; <nativeNumber)
{
nativeChance = rmRandFloat(0,1);
if(nativeChance < 0.06)
{
rmSetSubCiv(i, "Zapotec"); <--this is the line orca suggested... its already in there.
rmEchoInfo("subCiv"+i+" is Zapotec");
ZapotecVillageID = rmCreateGrouping("zapotec village "+i, "native zapotec village "+rmRandInt(1,5));
rmSetGroupingMinDistance(ZapotecVillageID, 0);
rmSetGroupingMaxDistance(ZapotecVillageID, rmXFractionToMeters(0.45));
rmAddGroupingToClass(ZapotecVillageID, rmClassID("natives"));
rmAddGroupingConstraint(ZapotecVillageID, avoidImpassableLand);
rmAddGroupingConstraint(ZapotecVillageID, avoidTradeRoute);
rmAddGroupingConstraint(ZapotecVillageID, avoidTradeRouteSocket);
rmAddGroupingConstraint(ZapotecVillageID, nativesAvoidPlayers);
rmAddGroupingConstraint(ZapotecVillageID, avoidNatives);
rmAddGroupingConstraint(ZapotecVillageID, edgeConstraint);
rmAddGroupingConstraint(ZapotecVillageID, avoidCanyon);
rmPlaceGroupingAtLoc(ZapotecVillageID, 0, 0.5, 0.5);
}
else if(nativeChance < 0.12)
{
rmSetSubCiv(i, "Caribs");
and so on...

btw, is it too ambitious to want 16+ native sites on a huge map? seems like the game is just placing 3 or 4 most the time.

thanks guys.
Orca
Skirmisher
posted 10-19-07 09:25 AM EDT (US)     246 / 735       

I think I had a similar problem in one of my maps once.
I solved this by doing all the Subcivs commands before placing any native villages.
I dont know if it is really neccessary however it might help.
Try something like the following :

for(i = 0; <nativeNumber)
{
nativeChance = rmRandFloat(0,1);
if(nativeChance < 0.06)
{
rmSetSubCiv(i, "Zapotec");
// Save what civ number i is somehow.
}

else if(nativeChance < 0.12)
{
rmSetSubCiv(i, "Caribs");
// Save what civ number i is somehow.

and so on..

for(i = 0; <nativeNumber)
{
// Get what Civ i is an place according village
}



I think 16 native villages is virtually impossible because they have to be cept away from things like Traderoutes etc. with constrains and therefore you need pretty much space for them.
More than 8 native villages seems already very difficult, I would go for 8 and see if that works out.
RF_Gandalf
Skirmisher
posted 10-19-07 01:01 PM EDT (US)     247 / 735       
If your copied script portion is what is in your rms exactly, this line gives an error, I believe:

int nativeNumber = rmRandInt(16);

If you want it to be 16, it should read:

int nativeNumber = 16;

I am not sure that is what is messing up the native placement though. Why don't you simplify things, just try for (only) a native number of 8 and gradually expand from there, see how it works?

The constraints will keep some of the villages from placing once the map gets a little 'saturated' with villages - they cannot place too close to other villages, players, edge, trade routes, etc.

Post back if that does not help.
Jugit
Skirmisher
posted 10-19-07 05:27 PM EDT (US)     248 / 735       
erestel -

If you are still struggling with this:

Make sure each subciv matches each group name. If they don't match you cannot build there.

In the case above, "Zapotec" does match "native zatopec village"; but you don't show the rest. When you cut and paste it is easy to miss one. Also, be careful with "Caribs" and "native carib village"; note the "s". Likewise for Aztecs, Seminoles and Incas. The subciv has the "s"; the village does not. Another easy mistake.

Play the game and when you cannot build, note the village civilization and check back to that setup in the .xs file.

I could not find anything wrong with the Unknown.xs file. Are you sure that doesn't work sometimes? If so, one of the groupings could have the wrong socket in it.

Good luck.

[This message has been edited by Jugit (edited 10-19-2007 @ 05:30 PM).]

JacobZuma
Skirmisher
posted 10-30-07 03:46 AM EDT (US)     249 / 735       
Hi

I came across M0nTy_PyTh0n's article on the internet about changing camera pitch in RMS. However, he doesn't explain what the different values mean. What are the four different vectors for? I'm guessing the first one's for camera position...and the other 3...looks like sine's and cos's of angles but i'd like to know the significance. Is there anything out there about controlling the camera from RMS and not just the editor?

Thanks
JZ
As_Saffah
Scenario Reviewer
posted 11-01-07 02:47 PM EDT (US)     250 / 735       
The constraints will keep some of the villages from placing once the map gets a little 'saturated' with villages - they cannot place too close to other villages, players, edge, trade routes, etc.
Is it possible then, to rewrite the native village script so it just places clusters of the appropriate socket(s) and a few native buildings of the appropriate type? One of the ways I put 8 Cree + 8 Nootka villages in my HELL FROZEN OVER map (RMS version) is to just have for each native subciv, 2 areas defined on the map in which nothing may go except sockets + a few wigwams or prop teepees. This way I can have a cluster or two of Cree "villages" with 4-6 sockets, and a cluster or two of Nootka "villages" with 4-6 sockets. I get to cram them in because I'm not asking the system to find space for the whole Native Village grouping. True, it doesn't look as cool or polished as the usual large village grouping, but it lets players train huge numbers of native dorks, and they don't get trapped in the grouping as sometimes happens with Cheyenne riders on Gt Plains.

Crunkatog on ESO
Bart331 balance suggestion: aztec: remove civ
Voltiguer: Ender, Sioux in 1.04 will be a top civ, no matter how many layers of Sioux goggles you put on
schildpad on Elephants: ...their mansabdar unit sucks so hard it looks like a black hole
Crunkatog on Steam.
« Previous Page  1 ··· 8 9 10 11 12 ··· 20 ··· 30  Next Page »
You must be logged in to post messages.
Please login or register

Hop to:    

Age of Empires III Heaven | HeavenGames