Announcement

Collapse
No announcement yet.

Editing Public Works/Infrastructure?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Editing Public Works/Infrastructure?

    I was wondering if there was any way, without the cheat option that is, to create in a scenario, to find public works in say ruins.
    In risks.txt you can alter the percentages of either cities,settlers,gold,units,advances and chance of barbarians in ruins.


    I was wondering if anyone had ever tried adding a line, a flag, saying that you found 500 PW or what have you?

    Thanks in advance for any/all response!

    And ifin you have another way, please speak up!


    Yours In Civin

    Troll
    Hi, I'm RAH and I'm a Benaholic.-rah

  • #2
    It needs some SLIC'ing, and it would have to replace an existing thing that you can get from a goodie hut, but I think it can be done. (So long as SLIC1 is up to scratch. It qould certainly work in CtP2...)

    Firstly, open script.slc, and search for "found stuff". that will give you the messages that fire on opening goodie huts. Then find the one you want to replace, for example, message '83DiscoveredAncientTreasure'. Then between the lines Kill(); and } in that message block, add the lines:
    Code:
    value[0] = random(500);
    SetPW(g.player, value[0] + g.player.publicworkslevel);
    Then in info_str.txt (english/gamedata) find the lines DISCOVERED_ANCIENT_TREASURE "text" replace the 'text' with the message of your choice. Bear in mind: 1) You will get the gold anyway, it is hardcoded*, 2) the use of the "word" "{value[0]}" should make the actual value of PW you have received appear in the message.

    * In fact, because you cannot remove the innate chances, merely add PW to one or more of them, you may wish to add it to the settler or city one, with a message such as "Nomads have joined your civ, bearing a peace offering of {value[0]} public works."

    NB: I don't know whether SetPW is a SLIC1 function, and my knowledge of SLIC1 syntax is poor, I'm trying to learn it from TP's PowerSLICs while I type If that code doesn't work, I'd suggest asking Locutus if there is a SLIC1 equivalent...
    Concrete, Abstract, or Squoingy?
    "I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis

    Comment

    Working...
    X