Announcement

Collapse
No announcement yet.

WW2 scenario including the U.S

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

  • #16
    Sorry about that. Two additions to the slic:

    int_t turnMax; // Defines the variable turnMax

    turnMax = XXX; // Assigns a value to turnMax (see below)

    With the assign statement (turnMax = XXX; ) you will need to modify the XXX part to however many turns are in the game. IE: if you have 1000 turns in the scenario, then change XXX to 999.

    Hope this helps.
    Attached Files

    Comment


    • #17
      -Dale, the modifications you made on the slc stopped the crashing of the game but i don't think the slc is working. The germans love everybody and the allies hate me.

      If you want here's my scenario so far. I've looked at everything and i can't figure out what's wrong. Don't laugh at my scenario it's still a work in progress.

      Comment


      • #18
        Here it is:

        Comment


        • #19
          :
          Attached Files

          Comment


          • #20
            I've been getting these error messages on my scen.slc because i've tried to make one of my units veteran. i placed the following lines in my slc:
            "unit_t archerUnit;" because i replaced my archer's name in the gl_str.txt but it's still practically the same unit except for increased stats.


            "// Refresh Veteran effect for Generals
            VeteranEffect();
            }
            }"

            i also put in "include "WAW_func.slc"
            In the WAW_func.slc i erased everything but this:

            // Turns units near Generals into Veteran and all other units non Veteran
            void_f VeteranEffect ()
            {
            int_t i;
            int_t j;
            unit_t tmpUnit;
            int_t tmpNum;
            int_t numUnits;
            int_t tmpPlayer;

            for (i = 1; i < 5; i = i + 1) {
            if (IsPlayerAlive(i)) {
            player[0] = i;
            tmpPlayer = player[0];
            numUnits = player[0].units;
            // Make all units non veteran
            for (j = 0; j < numUnits; j = j + 1) {
            GetUnitByIndex(tmpPlayer, j, tmpUnit);
            ToggleVeteran(tmpUnit, 0);
            }
            }
            }

            // Make all Units veterans who share the location of the Generals
            if (archerUnit.valid) {
            tmpNum = GetUnitsAtLocation(archerUnit.location);
            for (i = 0; i < tmpNum; i = i + 1) {
            GetUnitFromCell(archerUnit.location, i, tmpUnit);
            ToggleVeteran(tmpUnit, 1);
            }
            }

            the error i get is that archerUnit is undefined. If anyone knows what i need to change please let me know.

            Comment


            • #21
              Firstly, here's the fixed up scenario.slc from ages ago where everyone will be agro for 1000 turns.

              I'm looking at the other problem you mentioned and should have an answer for you soon.
              Attached Files

              Comment


              • #22
                Question:

                In your units.txt, what is the internal name of the leader unit? IE UNIT_LEADER.

                Comment


                • #23
                  the error i get is that archerUnit is undefined. If anyone knows what i need to change please let me know.
                  I can't access your files right now but where did you place the line 'unit_t archerUnit;'? And do you also assign a value to archerUnit somewhere? In the code you posted the unit never actually contains a value, it's an empty variable, and you can't get the location from a unit that doesn't exist ('cause that's what an empty unit variable represents)...
                  Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                  Comment


                  • #24
                    Locutus:

                    No need to worry mate. I've re-written his code a fair bit to get the leader/veteren units working. I have the whole code finished except for the units.txt name of the unit (UNIT_LEADER or whatever it is). That's the only thing I need to finish it up.

                    Comment


                    • #25
                      Oh, okay.
                      Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                      Comment


                      • #26
                        the internal name of the unit in the unit.txt is Unit_ARCHER.

                        Comment


                        • #27
                          Inversion:

                          Here's your leader script. It'll look for any archers and veteren every unit in that cell. Read through the attached file and you'll see I've labelled what goes into scenario.slc and what goes into WAW_mod.slc. If you copy and paste those lines into those files, it should work.

                          Of course the standard disclaimer applys: not tested, not guarenteed.

                          Comment


                          • #28
                            Sorry, forgot to attach the file.
                            Attached Files

                            Comment


                            • #29
                              Where exactly do the lines for the scenario.slc go? i tried putting them at the start and they won't work.Where do they go?

                              Comment


                              • #30
                                when i don't get a message that i have a "syntax error" i get one that there is no function for Veteran Effect.

                                Comment

                                Working...
                                X