Announcement

Collapse
No announcement yet.

Bringing barbarians back to the oceans of CTP2

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

  • Bringing barbarians back to the oceans of CTP2

    HI Y'all !

    Did you like those barbboats in CIV1 very much, I know I did, just when you where about to land your trireme on uncharted land a little red boat would appear and sink your fleet !
    Isn't that fun

    what I want to do is bring them back, I want to see barb battleships roam the sees, but I NEVER EVER programmed even a word in SLIC so I need your help !!

    Everyone who has suggestions about what should be in this mod and everyone who would like to give me some pointers as to programming in SLIC would be greatly appreciated

    Here r a few things I thought of :
    - To see what kind of boats you could ginve the barbs first look to see how the players r advancing...you might want to take the strongest player (AI or not) and go from there.
    So if AI player 1 has battleships but the others have trireme give the barbs battleships, it makes things more exiting !
    - Second, how many boats would be wise to generate and must we keep count of how many are destroyed, when the number of boats reaches 10, generate new ones OR do we generate new boats each 20 turns or so ?
    -Third, but this is a long shot, how do I create barb transports and carriers with payload, and do we want to give the brabs subs with nukes ????? I think not because they are bound to fire them wich in turn creates uncontrollable pollution ! But if you guys want that ........

    GIVE me some ideas to work with, what would you like to see happening ! Please let me know !
    Can't wait to hear from Y'all !

  • #2
    Well here I am in my own thread, my question is bound to be posted somewhere but the barbs...which number is that is that civ[0] for example.

    Because otherwise I might start making units for civ1 ! that would be not so nice

    Small question aint it !

    Comment


    • #3
      its fairly simple....Right click on your Slic File and hit "open with" ......Then find Notepad or Wordpad...And figure it out from there....I think your gonna need an entire new slic...I think it may be impossible to edit that attribute to this game.And yes i remember the stupid Barbarians from Civ2.Always come and Land near your capitol. Coming on Trimes nd Cravals if i remember correctly.....

      Comment


      • #4
        its fairly simple....Right click on your Slic File and hit "open with" ......Then find Notepad or Wordpad...And figure it out from there....I think your gonna need an entire new slic...I think it may be impossible to edit that attribute to this game.And yes i remember the stupid Barbarians from Civ2.Always come and Land near your capitol. Coming on Trimes nd Cravals if i remember correctly.....

        Comment


        • #5
          This is whatI have so far, I programmed a loop to check every turn if one of the players has got an advance where they recieve a waterunit, ex steel.

          If that is so than a random number of units is created, but I have to assign these units to the barbs, how the hell do I do that.

          What player number does the barbs have ?

          If I get this then pretty soon I will be able to make a working script, because it's vacation time !!! YEEEHAAWW !

          I can program my mod all day and hope to have a beta ready for testing about the fifth of march.
          I want to do it well and not just half of it

          Hope you have the patience to wait, it's going to be good ! (I hope)

          Still, anything is welcome !

          Greeetinx and happy vacation time

          Comment


          • #6
            I think player[0] is the barbarians.
            Will your checking for advances lead to thousands of barbarian sea units, or will you do an "every Nth turn loop" or something ?
            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
              Good to see you picked this up, Huysmans
              Actually, barbarian player is player 0, not player[0]. The difference may seem trivial but it isn't. player[0] is a variable that will change throughout the game (just as the rest of the player[] array) and it is the value 'inside' this array-element that determines the actual player. So to use the barbarians, simply use 0 where you'd normally use player[0]. However, if you need properties of the barbarians, such as how many units they have, you'll have to put them in one of these variables first, like this:

              player[3] = 0; // barbarians (3 could be any number)
              tmpValue = player[3].units;

              Hope this helps,

              Wouter

              PS Vacation? What's that? I vaguely seem to recall the term but it's been such a long time, I don't even remember what it was...
              Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

              Comment


              • #8
                Huys:
                At the beginning of every turn it's good to check whether the 'current' player is the barbs and then code them. EG:

                Code:
                HandleEvent(BeginTurn) 'CheckForBarbs' pre {
                     if(g.player == 0) {
                          // This is for code to perform when barbs turn
                          // You could write code to find a spot to spawn from - "location_t barbtmploc;" and then assigning a location to barbtmploc.
                          // Then using barbtmploc you create the unit
                          CreateUnit(0, UNIT_CATAMARAN, barbtmploc, barbtmpunit);
                          // barbtmpunit is the variable to store the new unit if you want to assign an order to it yourself rather than the AI assign to it.  "unit_t barbtmpunit;"
                     }
                }
                Hope this helps mate.

                ------------------
                Rommell to a sub-commander outside Tobruk: "Those Australians are in there somewhere. But where? Let's advance and wait till they shoot, then shoot back."

                Comment


                • #9
                  Locutus, Dale : Great to see such great minds help out a little SLIC programmer.

                  I'm currently in the proces of just spawning a barb unit in the sea but even that doesn't work.
                  I use the makelocation, where the location is combined of a x and y.
                  I randomize the x and y between certain values ex 25
                  So I'm left with tmp_loc but then I have to check if the newly created tmp_loc is a water square...this is not a problem.
                  If it's not randomize another set of x and y and go over the loop once more.
                  BUT THE makelocation doesn't work it says out of bounds error !
                  No matter what I do !

                  I'll write your advice down, but first lets create a unit, that's the basic part, on water
                  I think that I'll write the advance checking routine at the beginturn routine, then I can make a loop which checks all players, if that player has one of those advances....then set a global variable to 1 and use this in the barbsturn routine.
                  Is this any good ?

                  I'm thinking of how much units to spawn, in the beginning I think not so very many, but in the end when everone has a fleet, than it's ok to spawn whole fleets of barbs....what do you think ?

                  So you see, there's a lot of work to be done

                  Locutus, don't you have springbreak ? (carnavalsvakantie) Sorry folks that was a dutch term and I don't know how to put it in english !

                  Well I'll hope to have a beta ready soon, I have some great ideas but this searching for water square doesn't work...GOe$#@@#$#$@#it !

                  See Y'all, I'll be on the forum a lot even though I have vacation !

                  Comment


                  • #10
                    quote:

                    Originally posted by Locutus on 02-22-2001 04:02 PM
                    Actually, barbarian player is player 0, not player[0]. The difference may seem trivial but it isn't. player[0] is a variable that will change throughout the game (just as the rest of the player[] array) and it is the value 'inside' this array-element that determines the actual player. So to use the barbarians, simply use 0 where you'd normally use player[0]. However, if you need properties of the barbarians, such as how many units they have, you'll have to put them in one of these variables first, like this:

                    player[3] = 0; // barbarians (3 could be any number)
                    tmpValue = player[3].units;



                    Which is why I leave SLIC alone as much as I can. I can't cope with all these weird terms!
                    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


                    • #11
                      Huysmans,

                      The explanation of the problem would become a whole lot more understandable if you posted the actual sourcecode as well (use to ubb-tag code to make it look understandable). Out of bound errors indicate that you made some sort of mistake in an array (you probably already figured that out), so double check every occurance of an array(-element) in your code. Can't say more about it until I see the source.

                      Carnaval? Ahh, that explains why half the people I encountered today were dressed up so funny Nope, here at the University of Twente we only have a (short) Christmas break and a summer vacation, the rest of the year you can take a day (or week or months or whatever) off whenever you want, but the schedule simply doesn't always allow this. Currently I find myself working 70+ hours a week just to get my schoolwork done, so not much time for vacation (or sleep for that matter)
                      Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                      Comment


                      • #12
                        Hi guys,

                        Wanted to say thanx for all the support on this one, and indeed like you said locutus, it gets easier if you practice a lot.
                        And now it's even fun to do, I WANT it to work, so eventually it will !

                        Well, I just heared I have to work next thursday so I'll hope to post a version then, but don't count on it !

                        Locutus, the beta code will be coming to you soon, I just worked out the rough edges so it should take form any day know.
                        Only problem is...I code at work where I don't have CTP2 to actually test the stuff so I'm going home now with the script to test it (Hope my computer doesn't blow up ! )

                        I see little ideas about the pirates....WHAT WOULD YOU the users like in my script, tell me and I'll see to it that it gets in !

                        If noone talks to me, I just made this script for myself and noone else...kinda sucks then !

                        Well hope to hear from you soon !

                        greetinx, Huysmans

                        Comment


                        • #13
                          Myself, I would like the code to make the Pirates sea-based complements to the land Barbarians. I would like for them to start appearing about 125 turns into the game, and keep appearing until the end of the Renaissance age, about turn 400 in my mod.
                          They would be created outside the boundaries of civs, like the Barbarians.

                          Ideally, I would like for both warships and transports to be available to the Pirates, with the specific types the same as those available to the civs in the game at that time.
                          The transports would be supplied with a couple of land units, comparable to the land Barbarians available at that time, and these transports would then proceed to the nearest city and unload those land units on the shore there.
                          Warships would pirate trade routes, pillage improvements and attack any ships they came across.

                          Specific enough?

                          Comment


                          • #14
                            In the modern era I'd restrict the pirates to having PT Boats and perhaps Transports. I can't think of any terrorist orgs or guerilla armies that can afford large warships. I have read of drug cartels purchasing ex-Soviet subs so maybe non-nuclear subs could be included. While we're talking boats...I'd love to see a sprite of a military transport ship (the CTP transports look like cruise ships) and then make the current Transport only be able to carry civilian or stealth units. Just an idea....

                            Comment


                            • #15
                              Everything Wes said, but not the ending at the end of the Renaissance, there are still Pirates on the oceans of the 21st century. They should however be vastly reduced in number with the invention of modern warships (ironclad perhaps).
                              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