A pile of requests and questions!

Discuss maps, trains and other modding topics
gforce
Posts: 234
Joined: Thu Nov 09, 2006 3:24 am
Location: Belgium, Brussels

Post by gforce » Sat Feb 24, 2007 5:56 pm

oh no, it doesnt work 4 events, i tested alot of different ways, it is hard coded, i guess :evil:
but tunnels work :twisted:

RedKnight
Posts: 139
Joined: Tue Dec 05, 2006 10:40 pm
Location: Atlanta GA USA

Post by RedKnight » Sat Feb 24, 2007 7:01 pm

Very interesting thread...

karsten, I fooled around with Events yesterday, trying to make a scenario WITHOUT any events. This was in order to have a "financial challenge" savegame to see who could make the most money, and I didn't want Events making somebody lucky.

I was playing with the US_Southwest map...

1) I could not make a RR_Events_US_Southwest that was "empty" i.e. only:

<RRTEvents>
</RRTEvents>

This resulted in very odd events, like Nitrates on the SW map. I guess it was drawing randomly from the master Event file.

2) I also could not make my own new, bogus events that did nothing (changed the price by 0%). Not in RR_Events_US_Southwest. This caused the game to crash, about the time an Event might've popped up (about 9 years into the game).

In retrospect I may have screwed up due to how the Good involved was Beer (so it would in theory have no impact, no how). Maybe it should've been something actually on the map, but without any actual change involved.

Or it may be that I needed to have several defined. I think I only made two events.

3) But what I could do, was reference useless events in RR_Events_US_Southwest:

<RRTEvents>
<Event>
<szTitle>US_COAL_INCREASE</szTitle>
</Event>
<Event>
<szTitle>US_COAL_DECREASE</szTitle>
</Event>
</RRTEvents>

There is no coal on the SW map. But sure enough, Coal events happened, and that was the only thing - there were no Stock events b/c they weren't in there. The game didn't crash. So I turned the Alert Option off for Events (so you only get the queue text, not the Newspaper), and could easily ignore it.

In hindsight, I am thinking I should have defined the bogus events in the master RRT_Events and then only referenced their name in RR_Events_US_Southwest (like was done for Coal).

However, Santa just plunked the new definitions right in it's local Events, hmm... why didn't that work for me? Maybe it was because I only made one bogus event, and the game requires more than one so it can randomly choose??

Also notice something interesting in Santa... it has a copy of the master Goods file, with the new goods defined... and then it has a local Goods file, wherein only the Santa goods are called (by name only). Yet another wrinkle to consider.

FWIW I also tried to turn off Patents somehow, again so that nobody gets lucky with an early, good Patent in the money challenge. I never was able to work it so that there were no, or only 1, Patent. It would always crash my game. There wasn't much point in just re-defining the master so that Patents were worthless (didn't change their variables)... then we'd get interrupted by auctions for worthless stuff. It's not a gamestopper for the Challenge anyway, b/c folks can simply be told to not get any Patents (and it can be checked with F7). Maybe I needed to either kill all Patents in the Master, or make more than 1 bogus Patent in the local?

It got real tiring to work with this stuff because the game has to run for 10 years or more before you might get a patent or event, to see if your change worked.

Anyway. Some thoughts - RK

User avatar
karsten
Posts: 643
Joined: Sun Dec 17, 2006 8:49 pm

Post by karsten » Sat Feb 24, 2007 7:32 pm

Interesting stuff :!: gforce, I will be testing your file, that is exciting. Good news: it works!

RedKnight , you can check in the log file, if the random event crashed you, it will be the last entry. :roll:

Both your research appears to indicate that modified global XMLs may be necessary. Storing such scenarios in a XUsermaps directory when not in use seems a clean and easy solution. :idea:
Last edited by karsten on Sun Feb 25, 2007 1:15 am, edited 2 times in total.

RedKnight
Posts: 139
Joined: Tue Dec 05, 2006 10:40 pm
Location: Atlanta GA USA

Post by RedKnight » Sat Feb 24, 2007 9:22 pm

Ah, cool... that will help tons, Karsten. In fact I gave up playing yesterday due to all the crashes (with long bits of play, waiting to see if it would work or crash)

woz
Posts: 1
Joined: Sat Feb 24, 2007 5:34 am

Post by woz » Sat Feb 24, 2007 10:03 pm

Does anyone know how you can add more AI players to the game instead of the standard three.

gforce
Posts: 234
Joined: Thu Nov 09, 2006 3:24 am
Location: Belgium, Brussels

Post by gforce » Sun Feb 25, 2007 1:55 am

You're right karsten, use a seperate folder for usermaps
I was thinking also on the RRT_difficulty xml file, this does not excist on maplevel (there's no way i can reference to such a file in the scenario file, and i already tried something like <DifficultyXMLFile> but it didn't work)
SO here you also have to use a (global) xml file to change this for your settings, no?

redknight, i will do some testing on patents, i'll let you know later...
(we could use patents also for the same purpose as events, but it should be bought then for free and even if it would have a negative impact (only useable for single play)) but also this will be only possible if we can control those patents and if we can't find a way to control the events (wich would be even easier)

ps: does someone know how to create a new building-name out of an excisting one, (i would like to have another (color and some other minor addaptions on the hospital to use as a new building) but it doesn't work, anyone already mannaged this, (i really did every logic step, it works fine in nifskope and know to write code for this but still iot crashes, id on't get it)

RedKnight
Posts: 139
Joined: Tue Dec 05, 2006 10:40 pm
Location: Atlanta GA USA

Post by RedKnight » Sun Feb 25, 2007 3:00 am

woz, I don't see anything that might affect # of AIs in the XMLs. Don't see any XML with a name like that, and it doesn't seem to be in Difficulty or Scenario, which might have held such a thing.

gf, I never tried making another building. It seems like it should work. Oh well. Are the names of industries hard-coded into the EXE? If they are, then it might not recognize anything else. (Hmm, it looks like the Railroads EXE is encoded. Oh well.)

gf re: difficulty, the only thing I can think of, is whether a local copy of it will over-ride the master copy. Either as RRT_Difficulty or as RRT_Difficulty_(map). Fortunately there are several ways to see immediately whether it worked or not, such as # of shares owned. Why not try both names variations, laugh... if it works, try removing one or the other.

Right, let me know about Patents, if you have any luck. As you can see, I didn't try all possible variations... I got tired. :P

There's one more thing I tested, FWIW... I tried to make the SW map only start on LA or San Diego, by setting the RRT_Cities_US_Southwest variable "bIsStartLocation" to "false" for all but LA and SD. Guess what? The game totally ignored it and started on other cities, too! Go figure. Since those two are Metros, I wonder if it makes a random roll for "Ok, find a Village to start with", and if there's no start villages in RRT_Cities, it gets any old Village. I see that the SW map has 2 Metros, 2 Towns, and 2 Villages as True for StartLocation, but no Cities... hmm.

Another general comment is that I assumed the XML was using some sort of "inheritance" scheme, where local XMLs over-rode any master XML. But now I'm not so sure; it may be more complex than that. E.g., maybe (maybe?) local XMLs can only invoke things detailed elsewhere, such as how Events only seemed to work by listing master Event names. But then the Santa instance was different from that. Could there even be another wrinkle, where Custom Assets (under My Docs/My Games) work different from Stock Assets (in the game directory)?? Shrug, I'm kinda lost.

User avatar
karsten
Posts: 643
Joined: Sun Dec 17, 2006 8:49 pm

Post by karsten » Sun Feb 25, 2007 11:03 am

woz wrote:Does anyone know how you can add more AI players to the game instead of the standard three.
IF I understand this question correctly, it is done in the scenario XML, like so:

<AICharacters>
  • <szName>Jay Cooke</szName>
    <szName>Jay Gould</szName>
    <szName>J.Pierpont Morgan</szName>
    <szName>Cornelius Vanderbilt</szName>
    <szName>Jim Fisk</szName>
    <szName>Jim Hill</szName>
</AICharacters>

Then again, if the question is: Can there be >3 AI players in the game simultaneously, I would think the answer is no. :)

RedKnight, I think the game needs at least 4 starting positions. My strategy for dealing with that is explained here

RedKnight
Posts: 139
Joined: Tue Dec 05, 2006 10:40 pm
Location: Atlanta GA USA

Post by RedKnight » Sun Feb 25, 2007 2:43 pm

Right Kars, I figure those names are only who are the allowable AI opponents. IOW, Americans in US and Europeans in EU.

That makes sense - 4 start positions. Because there can be 4 players in total. Something to try.

gforce
Posts: 234
Joined: Thu Nov 09, 2006 3:24 am
Location: Belgium, Brussels

Post by gforce » Sun Feb 25, 2007 3:47 pm

Hé guys,
some good news to start with:
look at the screenshots:
i managed a new building and new traincar model,
could be nice...

the bad news read remark on timescale and also my remark about railroad pieces.

still it must be my lucky day, 2 models in 1 hour...
Attachments
another new industrie
another new industrie
Hospital plus another building.jpg (93.23 KiB) Viewed 9072 times
another traincar
another traincar
Another passenger class type car.jpg (135.78 KiB) Viewed 9074 times

gforce
Posts: 234
Joined: Thu Nov 09, 2006 3:24 am
Location: Belgium, Brussels

Post by gforce » Sun Feb 25, 2007 10:24 pm

redknight, karsten
i had my own version of patents running, see below
- only 1 patent was showned during game (my patent), and i bought it
- no others!
- the game crashes
once at 1865 (started at 1834)
once at 1879 (started at 1834)
- this crash can be because of so many other things (it's a not very clean test everionment i've got setup, because i wanted to see my red-traincars passing by in meanwhile, also i put the game in fast-forward and maybe it can have a effect on ctds)
***
- maybe you're right, it crashes when he's looking for another patent to be choosen
- but maybe this could be solved by creating dummy patents (see below)
***
Here's the content of the RRT_patents.xml file, this is in my_map_folder but it is using not a mapname in the file-name (i can't find a reference in the scenario file) (so yes it would involve other scenarios if you've got others in the usermaps folder)
<?xml version="1.0"?>
<!-- edited with Stone and Chisel by Dan Magaha (Firaxis Games) -->
<RRTPatents>
<RRTPatentVars>
<iPatentDuration>20</iPatentDuration>
</RRTPatentVars>
<Patent>
<szName>TEST Pullman's Palace Car</szName>
<szDescription>TEST Pullman's Palace Car lives up to its billing, a veritable estate on wheels. Passengers will gladly pay a 25% premium to bask in its comfort.</szDescription>
<szBriefDescription>TEST 25% Passenger Delivery Bonus</szBriefDescription>
<szImage>Patent_Pullman_Car.dds</szImage>
<szLargeImage>Int_patent_pullman.dds</szLargeImage>
<szType>GoodDeliveryBonus</szType>
<Effects>
<Effect>
<!-- 25% bonus to passenger revenue -->
<szGood>Passengers</szGood>
<fModifier>1.50</fModifier>
</Effect>
</Effects>
</Patent>
</RRTPatents>

a dummy patent :P could be something like this:
....
<Effect>
<!-- NO BONUS -->
<szGood>Passengers</szGood>
<fModifier>1.00</fModifier>
</Effect>
1.00 doesn't have any effect, so no bonus, no effect but still (if necessary a patent that can be choosen by the main-program

got it? test it! and let us known! :wink:

gforce
Posts: 234
Joined: Thu Nov 09, 2006 3:24 am
Location: Belgium, Brussels

Post by gforce » Mon Feb 26, 2007 12:14 am

on a clean test env, i've got still a crash,
anyway, i hate this game :evil:
still i think that the previous post could work out, maybe not on my machine and in fast-forward or something stupid-else-thing :evil:

snoopy55
Posts: 1962
Joined: Mon Nov 06, 2006 5:13 am
Location: Centralia, Ill, USA

Post by snoopy55 » Mon Feb 26, 2007 2:33 am

OK, I've been playing around and found a solution for having no events. Copy the RRT_Events.xml into your map and set the date like so:

<szEarliestDate>1/1800</szEarliestDate>
<szLatestDate>1/1801</szLatestDate>

I ran it this way in Alaska with a time setting of 4 and got thru 1938 with no events showing. The master Events show this:

<szLatestDate>12/2050</szLatestDate>

so all you have to do is run a Find and Replace to change all the dates to 1/1800

As to Difficulties, that is a 'Master file does all' thing. I created the Analyser that way and you can copy and rewrite a section of that for whatever you want for testing.
I'm correct 97% of the time..... who cares about the other 4%....

gforce
Posts: 234
Joined: Thu Nov 09, 2006 3:24 am
Location: Belgium, Brussels

Post by gforce » Mon Feb 26, 2007 4:03 am

:oops:
redknight, i thought you wanted to get rid off the patents and not the events
yes it's true: change the date and the event will not show up,
but that's just the big problem with events 4 me
- I want just more events, more control on when they will occure, but i or neither karsten can make this work
- to get rid of the patents (not the events) is also more of my intrest, reducing the maintenance cost by 50%, yeah right, then you're sure you can not follow up the amount of cash

snoopy, when we wantt to control the difficulty in our scenario and the tunnels and bridges and the patents and maybe more, then there's no way to control this when everyone keep the global files in the customassets dirs and neither there's no way we can prevent other scenarios not using our settings if they keep their maps in usermaps dir, i'm really sorry... i always do my best to not change any settings fe. wanted to use patents and/or events to control some of the difficulty settings like maintenace , bu!t i can't make it work, that event file is really not controllable, it drives me nuts...

RedKnight
Posts: 139
Joined: Tue Dec 05, 2006 10:40 pm
Location: Atlanta GA USA

Post by RedKnight » Mon Feb 26, 2007 4:30 pm

Snoopy, good thinking! Sounds like that will take care of it.

gforce, what does your Log say when testing Patents and it crashes?

I can't think of a direct way to have more events - not one that I'm certain of.

There is a Probability field. But I don't know if this makes Events more likely to happen in an absolute sense - more Events per decade - or in a relative sense: Coal happens more often than Oil, if its Probability is higher, but it doesn't change the number of events per decade.

I suspect it is the latter - relative probability.

Other things that could be played with (but are a hassle to test) are:
1) The Duration... if you want them to last longer or shorter.
2) The time period. You could in theory have e.g. a bunch of different Coal events (with different master files names, like Coal_Early) that effectively gave you different sets of Events, depending on the game year. See how the stock market has 3 events, and most goods actually have 2 up and 2 down events? They're defined as being for US vs. EU but in reality, they are all just event names. So make a dozen Coal events with slightly different names, if you want.

I don't think any of the above are exactly what you want. You want to change the number of events per decade to be higher or lower, or even overlap, yes? A big problem is the randomness of them... even if you set Duration low, there are liable to be gaps between events. And if Duration is set too low, it will happen so fast that few trains will be able to take advantage. A Large raw resource (which drives any upstream production chains) produces 4.4 carloads a year, thus a full train (Wait 8 ) only comes through every 22 months. If the Duration is less than 2 years, it's liable to be entirely missed by some trains, esp. if on Wait 8 or the train is near capacity.

Note that the Duration field must be divided by 30 to get the number of years it lasts. Don't ask me why they chose that. For more background on Events, see this wiki page (but it doesn't have much about XML).

It's not a huge deal that we can't totally turn off Patents, at least not for my financial challenge. It's easy to ignore them (as well as to check that a contestant did). But still, it would be nice.

I will not have any time for testing any time soon. Gotten busy here.

Post Reply