Announcement

Collapse
No announcement yet.

[C4:AC][Programming] First try: harvester

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

  • #31
    I have copy-pasted my mod from the beta-SDK to the 1.61 SDK.

    I attached it here. Why?
    => To backup my claims made here with actual evidence
    => Because instead of only suggestions, maybe someone will try to do something from the (included) todo list.
    => Because it includes basic code for things c4:ac will need anyway :
    ---> a home city for each unit
    ---> adding tags to xml
    ---> exporting more functions to python
    ---> creating new commands for units

    For changes in the SDK : do a "find in files" for "//PJMOD".

    For xml-changes : use winmerge to compare them to the originals. (I had bad experiences with writing comments in the xml files).
    Only changes : added 3 mission info's, added optonal bCrawler tag to unit info's, added crawler class and a crawler unit.


    Harverster.zip : this is the directory you should unzip to the civ4/mods/ directory. It includes todo.txt, xml-files and the dll.


    HarversterSDK.zip : this is the modified SDK
    no sig

    Comment


    • #32
      BTW: could somebody please setup SVN or CVS acces with civ4 SDK sources ? It would be a lot easier for all these kind of things (ie: only needing to upload 10 actually modified files, automaticly see the changes someone made instead of they needing to upload their whole SDK etc ...)

      I'd surely use it, but I have never used it before, so I can't set-up such a thing.
      I also think it would be very good if we started with a clean civ4 SDK.
      I could then upload all my changes for the home city bundled in one update, all my changes for the bCrawler xml tag in another update etc... Then if someone wants to do something similar, it's very easy to see how it's done.
      no sig

      Comment


      • #33
        Here are 4 icons for the crawler unit and the crawler "orders":



        Uploaded here.

        Comment


        • #34
          Thanks a lot Rubin !
          no sig

          Comment


          • #35
            I'd hate to be a resource slut but was wondering if the unit model itself was at a production stage. I would love to "borrow" it for our SMAC spinoff

            Planet Roanoke -- a Civ4/SMAC Remix

            Comment


            • #36
              padmewan : I have the model .max and in .FBX format. I don't have any 3D graphichs programs installed on my pc, so I can't convert it to .nif (which is needed for civ4).

              You'll have to ask gclarkson though if you can use it (and give us the converted nif)
              no sig

              Comment


              • #37
                Originally posted by PJayTycy
                (and give us the converted nif)
                He who knows others is wise.
                He who knows himself is enlightened.
                -- Lao Tsu

                SMAC(X) Marsscenario

                Comment


                • #38
                  I'm happy to share whatever I come up with for anything. We're having a bear of a time conveting the SMAC symbols over to Civ4 flags right now but if we beat you to it you're welcome to anything we come up with.
                  Planet Roanoke -- a Civ4/SMAC Remix

                  Comment


                  • #39
                    Originally posted by Padmewan
                    We're having a bear of a time conveting the SMAC symbols over to Civ4 flags right now but if we beat you to it you're welcome to anything we come up with.
                    Hm. Would that be just the 14 council logos (from the faction .pcx files) scaled and pasted onto 14 .dds images? If so, I think I could do that.

                    Comment


                    • #40
                      Originally posted by Rubin
                      Hm. Would that be just the 14 council logos (from the faction .pcx files) scaled and pasted onto 14 .dds images? If so, I think I could do that.
                      Yes... I spent quite a few hours cutting them from the faction3.pcx file and cleaning them up, but ultimately I don't have an editor capable of handling the alpha channel the way Civ4 likes...

                      Good luck with it, the whole flags thing is fun... the whole whiteflag=1 tag and everything is inscrutible to me...
                      Planet Roanoke -- a Civ4/SMAC Remix

                      Comment


                      • #41
                        problems solved (well, I know how to do it now, still have to implement them) :


                        home city
                        => rehoming mission available when a unit is inside a different city (owned by the same player ofcourse)
                        => capturing / gifting of units rehomes unit to closest city of acquiring player
                        => city capturing / gifting / razing rehomes units to closest city

                        crawl missions:
                        => plotyields changes (by a building, by a tech, by a worker, by pillage, by ...) are now accounted for.
                        => mission cancelling (not completely sure if my intended change will work in all cases though)


                        I'll implement this tonight, and I'd consider the core programming work finished then. Some extra work might be to change the city screen to give more info about which units are crawling what for this city, which units are "homed" here, ... but I consider that "minor" / "detail" work currently, as the city interface will most likely change anyway.
                        no sig

                        Comment


                        • #42
                          capturing / gifting independant units: should they stay independant or be assigned a home city like a normal unit in such case ?
                          no sig

                          Comment


                          • #43
                            Personally, I'd go with remaining independant.

                            Comment


                            • #44
                              I had almost everything finished for this mod, but some issues arose while playtesting it this evening:

                              Everytime I move a unit which has a homecity assigned, all ocean tiles around that homecity gain +1 gold in the interface.

                              If you work those tiles, they give the correct value.
                              If you open up a python console and execute plot.getYield(...), you get the correct value.
                              However, the mouse-over info and the plot-yield graphics are often wrong.

                              This is so weird I've just given up after more than one hour looking for a solution.


                              Screenshots (new buttons courtesy of Rubin)
                              all units have a "rehome" command available when they are inside an other city.
                              Unlimited space to host images, easy to use image uploader, albums, photo hosting, sharing, dynamic image resizing on web and mobile.


                              crawlers can be used to hurry production
                              Unlimited space to host images, easy to use image uploader, albums, photo hosting, sharing, dynamic image resizing on web and mobile.



                              If somebody else wants to playtest this, go ahead. One of the things I doubt will work is saving/loading games. Didn't test it though, so maybe it does work.

                              Mod to be installed in the civ4/mods directory:


                              Source code in case someone wants to help me debugging:
                              no sig

                              Comment


                              • #45
                                It's silly, but you should really start calling it a Supply unit. "Supply Cruiser", Supply Foil, etc. Crawler Cruiser makes no sense. I might want Supply Needlejets.

                                Lookin good though!

                                Comment

                                Working...
                                X