Announcement

Collapse
No announcement yet.

Old Question, maybe

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

  • Old Question, maybe

    This has probably been asked to death, or at elast asked before.

    I'd like to make more units like the eco ranger, that require a wonder before they can be built, can this be done? ....or is it a hard coded effect? which files (guesses welcome) would need to be edited to accomplish this?

  • #2
    Nope. IIRC basically a hard coded effect:

    I.E.

    the "EnableParkRangers" flag in Wonder.txt

    It might be nice to have a slightly different way of doing this:

    EnableBuildClassGlobal value

    for Wonders and Feats (and allow it to be changed thru SLIC too)

    EnableBuildClassLocal value

    for City Improvements (and allow it to be changed thru SLIC too)

    and

    BuildClass value

    for Wonders, City improvements, Tile Improvements and Units

    Comment


    • #3
      Was afraid of that, thanks anyway

      Comment


      • #4
        No problem.

        and I wouldn't worry too much about it... these type of things are relatively simple to fix.

        As its mostly the modders involved in the CTP2 Source Project, the things to do with modding flexibility (where they make sense) should get solved.

        Comment


        • #5
          There is a way around it via slic which is easy to right all you have to do is to Wright a small amount of code that basically gives a civ with that wonder accesses to that tech

          Code:
          HandleEvent(CityBeginTurn) 'grantadforwonder' post 
          {
          	if(CityHasWonder(city[0], WonderDB(WONDER_EMPIRE_STATE_BUILDING))) {
          	GrantAdvance(CITY[0].owner, AdvanceDB(ADVANCE_AGRICULTURE));
          	}
          }
          Here I have made it for you all you have to do is make a dummy advance that needs itself for research to start (look at subnural adds).

          Then make that unit only build able with the discovery of that advance.

          then stick this in scenario.slc then change agriculture for the advance and empire STATE BUILDING for you wonder

          Pc sorry I could not test it but it should work
          "Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
          The BIG MC making ctp2 a much unsafer place.
          Visit the big mc’s website

          Comment


          • #6
            Or save time and grant the advance on the CreateWonder event.

            Code:
            HandleEvent(CreateWonder) 'grantadforwonder' post 
            {
                         if(value[0] == WonderDB(WONDER_XYZ)){
                               GrantAdvance(city[0].owner, AdvanceDB(ADVANCE_XYZ));
                         }
            }
            Or use mod_CanCityBuildUnit to detect the wonder, and not bother with a dummy advance.

            edit/ Damn I'm rusty.
            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


            • #7
              me too
              "Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
              The BIG MC making ctp2 a much unsafer place.
              Visit the big mc’s website

              Comment

              Working...
              X