Announcement

Collapse
No announcement yet.

I've got a few q's about modding

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

  • #16
    Originally posted by ADG
    Ok, I didn't check if I spelled right... But is it something like that?
    Just use copy (mark a line and press Ctrl and c on the same time), then go to the target document and press Ctrl + v.

    -Martin
    Civ2 military advisor: "No complaints, Sir!"

    Comment


    • #17
      Originally posted by Martin Gühmann
      Just use copy (mark a line and press Ctrl and c on the same time), then go to the target document and press Ctrl + v.

      -Martin
      Yeah, I know, but I was just too tired at that moment to open all the documents again, and try to fix around with them... but thx anyway
      This space is empty... or is it?

      Comment


      • #18
        It says there's a syntax error on this line:

        Code:
        if(TileHasImprovement(location[0], OLD_TILEIMP[i])) {
        This space is empty... or is it?

        Comment


        • #19
          That is why i hate slic. one small typo and frustation comes to you.
          It is a missing '{' in the line before. I edited the code from its post it should work now.
          Sorry.
          "Kill a man and you are a murder.
          Kill thousands and you are a conquer.
          Kill all and you are a God!"
          -Jean Rostand

          Comment


          • #20
            Ok, thx, it works now (Well...it starts without complaining, haven't tested if the code works

            Can't wait til the day, were I might be able to see what the errors mean (Just started learning java last week, so there's still a long way )...
            This space is empty... or is it?

            Comment


            • #21
              I just loaded a savegame to test if it works, but I don't get the bonus...
              This space is empty... or is it?

              Comment


              • #22
                Originally posted by ADG
                I just loaded a savegame to test if it works, but I don't get the bonus...
                EDIT: Woops, I ment to edit instead of reply...

                Is it because in this line, you sets the number of the player. Shouldn't it be something like the i in PW_BONUS[i]? Otherwise the player who gets the bonus is always the same player... or am I mistaking here?

                Code:
                setPW(player[0], FinalPW);
                This space is empty... or is it?

                Comment


                • #23
                  When you load a saved game. the slic codes are the same as the ones you saved. So my slic code is not part of.
                  To tell the PC that you have a new code in your game data you must press ' and the chatbox will open.
                  Then type
                  Code:
                  /reloadslic
                  And press enter. The game will search for new codes and changes in the code in your game data.
                  New games dont need this procedure.
                  "Kill a man and you are a murder.
                  Kill thousands and you are a conquer.
                  Kill all and you are a God!"
                  -Jean Rostand

                  Comment


                  • #24
                    Ah, ok, thx for the help, it now works fine, now I only need to finish the code, so it works for the other TI's too
                    This space is empty... or is it?

                    Comment


                    • #25
                      Originally posted by ADG
                      I just loaded a savegame to test if it works, but I don't get the bonus...
                      You just loaded a save game? In that case this is to less. You have also to reloadslic to do it just open the chat window by typing the apostrophe key (') and enter /reloadslic. Alternatively you can also open the cheat editor and press the reloadslic button. BTW the cheat editor is a great tool to test such code, but don't expect if you place a tile improvement with the cheat that you get the bonus you have to do it regulary. But you can first place a tile improvement and then close the cheat editor and place then the upgrate improvement.

                      -Martin
                      Civ2 military advisor: "No complaints, Sir!"

                      Comment


                      • #26
                        Originally posted by ADG

                        Is it because in this line, you sets the number of the player. Shouldn't it be something like the i in PW_BONUS[i]? Otherwise the player who gets the bonus is always the same player... or am I mistaking here?

                        Code:
                        setPW(player[0], FinalPW);
                        Hey you are already commenting codes. Big step in slic learning.
                        Let me aswer you:
                        Check this part:
                        Code:
                        InitialPw = player[0].publicworkslevel;	
                        FinalPW = InitialPw + PW_BONUS[i];		
                        SetPW(player[0], FinalPW);
                        The SetPW(int_t, int_t) function works not adding the value of the second argument (int_t) to the player PW amount but replacing.
                        So in this piece of code:
                        line1: i get the player PW (InitialPW)
                        line2: make a new value(FinalPW) adding to the InitialPW value the PW_BONUS[i]
                        line3: Change the PW reserve of the player[0] to be equal to FinalPW

                        Remember: the TI entry names can be foun in the tileimp.txt

                        PS: I learnt slic in less than two days reading the info in this thread and locutus slic manual:


                        Of course. Make codes that actually worked took me a little while

                        EDIT: I never had experience in any coding language. Slic was the first.
                        Last edited by Pedrunn; September 14, 2002, 09:33.
                        "Kill a man and you are a murder.
                        Kill thousands and you are a conquer.
                        Kill all and you are a God!"
                        -Jean Rostand

                        Comment

                        Working...
                        X