Announcement

Collapse
No announcement yet.

For Locustus or Others

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

  • #16
    Look what you made me get into Locusus! just joking

    But I felt a little overwhelmed or discouraged when I read the codes you posted for some of my ideas. Nevertheless, I am going to study what you have posted here so far and look at the SLIC documents now that I have the text editor you suggested.

    Thanks for your help thus far, and let me know if you would want me to create any Great Library text for any part of your mod(s).

    I will let you know how my comprehension on SLIC is coming along.
    A lot of Republicans are not racist, but a lot of racists are Republican.

    Comment


    • #17
      Yes, I agree this particular code looks overwhelming (esp. since I screwed up the layout but am too lazy and busy to fix it ), but most of the coding should he relatively simple.

      You're too late with your GL proposition, I already have Wes & Harlan working for me Once that work slows down I'll have more time for helping people like you (don't even need anything in return), but that'll be a while...
      Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

      Comment


      • #18
        Damn - and I enjoy making original Great Library text.

        Oh well, maybe in the future I'll find an opportunity to reciprocate.
        A lot of Republicans are not racist, but a lot of racists are Republican.

        Comment


        • #19
          I have a question about SLIC
          I would like to add a new feature in my mod (suggested buy someone else here) : you can build some units only if you have a specific building in the city (for instance, you can build cleric only with a Shrine).
          In the Alexander scenario, there is some code where they prevent some units building in some specific cities.
          How could it be changed to make it work without recording the city location first?
          How could I test if a building exists in this city?

          Comment


          • #20
            That's an easy one, can write that one in 30 seconds (Usual disclaimer: not tested, could contain typos or other minor bugs)

            edit: ) added where needed

            Code:
            int_f mod_CanCityBuildUnit(city_t theCity, int_t theUnit) {
            
            	if (theUnit == UnitDB(UNIT_ARCHER)) {
            		if (CityHasBuilding(theCity, BuildingDB(IMPROVE_GRANARY))) {
            			return 1;	// can build this
            		} else {
            			return 0;	// can't build this
            		}
            	}
            	if (theUnit == UnitDB(UNIT_TANK)) {
            		if (CityHasBuilding(theCity, BuildingDB(IMPROVE_FACTORY))) {
            			return 1;	// can build this
            		} else {
            			return 0;	// can't build this
            		}
            	}
            	return 1;	// can build all other units
            }
            [This message has been edited by Locutus (edited January 17, 2001).]
            Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

            Comment


            • #21
              MrFun,
              Check out the new documentation for feat.txt and the like. That might give you some good ideas for feats. I didn't look into it too closely yet but it looked like there were some things in there I for one didn't knew were possible.
              Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

              Comment


              • #22
                Ok Locusus - will do!
                A lot of Republicans are not racist, but a lot of racists are Republican.

                Comment


                • #23
                  I've been studying the SLIC guides on the Apolyton website and I THINK I am understanding more of it.

                  I also LOVE the text editor you pointed out, Locutus. I ended paying for the official registration.
                  A lot of Republicans are not racist, but a lot of racists are Republican.

                  Comment


                  • #24
                    How will the AI handle this? Will it understand that a particular building must be built first? Or will it get stuck in a loop trying to repeatedly pick the same unit to build?

                    For those that try this before I have a chance to, beware the missing ")"s on the CityHasBuilding lines. I havent figured out SLIC yet, but i do know you have to pair off all the open "(" or "{". If they arent you get a SLIC error. Yes, I found this out the hard way

                    ------------------
                    History is written by the victor.

                    Comment


                    • #25
                      AW,
                      Don't worry, the AI can deal with this just fine. The way you should look at it is that this function makes that the unit types that can't be built don't even show up in the buildlists the AI chooses from (so it kind of temporarily modifies the file UnitBuildLists.txt in-game), so if the Tank isn't available the AI won't even know it exists (or at least not in that particular city, in the Alexander scenario this stuff varies per city: some cities can build Hoplites, others can't).

                      The only thing to keep in account here is that the buildlists need to be adapted so that it builds certain buildings earlier to get access to all units.

                      (BTW, fixed the (-problem, thanks for pointing that out, I always screw those up)

                      MrFun,
                      It's very good to hear you're beginning to learn SLIC (don't hesitate to ask me if you have any questions, but I'm sure you won't ) and it's particularly good to hear you liked EditPlus so much. I'd pay the registration fee myself if I'd have the money (and as as soon as I can afford it I probably will), but for now I'm just a chronically broke student who can barely pay his bills as it is Then again, if you realize that I probably introduced EditPlus to a several dozen people already and at least three of them ended up registering, the people of EditPlus ought to be paying me for my promotional work
                      Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                      Comment


                      • #26
                        Locutus, I will make the placard signs, and you and I can organize a picket at the company's building.
                        A lot of Republicans are not racist, but a lot of racists are Republican.

                        Comment


                        • #27
                          I was hoping thats how it would work. I'm good at finding syntax errors, but its when it "looks" right and still doesnt work that I get confused. I'd never have figured out the barracks bug because it all looked like valid code to me. But I'm learning...ssslllooooowwwwwlllllyyyyyyyyy

                          ------------------
                          History is written by the victor.

                          Comment


                          • #28
                            MrFun, sounds like a good plan, count me in
                            Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                            Comment


                            • #29
                              Hey Locutus, I found what seems to be a great deal for an impoverished university student like you or me.

                              On Amazon.com, there is a price of $43 for Corel Photo-Paint 9.0! I read the customer reviews, and based on the pros and cons, it LOOKS like it MIGHT be a good buy for altering CTP II graphics and creating new ones.

                              But I have one question that the reviews did not have any comments on - do you know if this program will allow me to open and edit .tga graphics?

                              If you do not know, I will try to look again for the answer to my question. thanks
                              A lot of Republicans are not racist, but a lot of racists are Republican.

                              Comment


                              • #30
                                Never mind about that - it is used mostly for digital camera owners. oh well
                                A lot of Republicans are not racist, but a lot of racists are Republican.

                                Comment

                                Working...
                                X