1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

moding question

Discussion in 'Rhye's and Fall Modmods' started by civfanatic13, Aug 1, 2010.

  1. civfanatic13

    civfanatic13 Chieftain

    Joined:
    Jun 25, 2010
    Messages:
    10
    I'm making an RFC:America modmod, and I wanted to add in the confederates and the natives.

    1. UHV: Is it possible to add UHV's, and if so, where and how couldI?

    2. Dynamic Civ Names: I already looked in the CvRhyes file, but I'm assuming its not as easy as it looks (i.e. Replacing the Confederates with a civ and then using the array) ###edit: just tried that, didn't work :(

    sorry, I really am a noob when it comes to C++ , any help would be greatly appreciated! :)
     
  2. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    I'd suggest you use one of the Independent Civs (there are two) as the Confederates. Adding a new Civ in RFC requires a lot of programming, much of it in C++. If you don't know how to do this yourself, I doubt anyone is willing to walk you through it. (It would be less work to just do it for you. Perhaps someone wants to do this for you?)

    The Natives are already in as a Minor Civ, but it would require almost as much work - and modding skill - to make them playable.

    All UHVs are located in the Victory.py file but adding your own requires pretty comprehensive knowledge of Python. I know people who have successfully copied and altered pre-existing UHVs for their custom Civs, but the time spent on trial-and-error could have been spent on actually learning Python. :rolleyes: Then they could have had both custom UHVs and programming skill, but I guess not...

    Dynamic city names are located in the CityNamaManager.py file and you'd pretty much have to add this information as part of your additional Civ. If you merely replace one of the existing Civs with you custom Civ - which isn't easy - then you'd of course have to edit the pre-existing city name map.

    Seriously, just go with Independents as the rebel Confederates. The rest of your scenario could probably be done with PyScenario - no programming required what-so-ever. :D This is exactly the sort of thing the application is designed for!

    And if you wanna change the "rules" of the game/mod later, then you can always learn Python. Its not Rocket Science, you know. (Its Computer Science. ;)) And from there it shouldn't be such a leap to C++ - figuring out how to compile the DLL might actually prove to be a bigger hurdle at that point. There is of course nothing stopping you from also adding the Confederate Civ eventually, but we all have to learn how to crawl and walk before we can run. So take it in strides! :king:
     
  3. civfanatic13

    civfanatic13 Chieftain

    Joined:
    Jun 25, 2010
    Messages:
    10
    thank you so much :)
    I am learning python right now and I'm beginneg to understand it better.
     
  4. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    Don't mention it. Perhaps I'll be able to help you for real at some point. :king:
    And by "Python" you meant the high-level programming language named after Monty Python - or the Python based scenario scripting tool called PyScenario? (There is a big difference.)
     
  5. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    As a little preview of things to come - this is what CivIV modding consist of:

    The World Builder Save file, or the scenario file. This is the scenario map and should contain all pre-set units and cities. But this is also where you specify what Civs are present in the scenario - and in which order they appear.

    Rhye, the designer of RFC, made two different scenarios: the 3000 BC start and the AD 600 start. An AD 1775 start for a America scenario would probably be based on the AD 600 scenario and this would also be your first order of business. Once you're ready to dig in, let me/us know and we'll get started.

    The XML is where CivIV defines myriads of settings and values for the game. You only need to mod this if you wanna change the way units, Civs, terrain or whatever function. Rhye has obviously edited the XML pretty extensively, albeit RFC is still a basically a version of CivIV. (Some other mods have done even more extensive XML changes.)

    The DLL file is an addition to the main game executable (the .exe file) and the game designers have outsources a lot of the game code here. By editing it - and recompiling it! - you can change just about anything about the game. Rhye has done a portion of RFC in C++, like the Civ spawning dates (so you won't be changing those any time soon...).

    And lastly, the optional Python code. The DLL (above) offers a number of "hooks" where some of the game rules can be outsourced to Python files - or modules as they are also known. This is universally useful for both modding and scenario making, but also has its built-in limitations. (So eventually you'll have to do some C++ work.) Rhye had done a large portion of RFC in Python, which makes the mod more accessible for mod-modding.

    Now, there is an additional optional layer to the Python modding, namely my PyScenario applications. Its used as a replacement for some of the features offered by Python modding, mostly for people who don't know any Python.

    Back to school, eh? :p
     
  6. civfanatic13

    civfanatic13 Chieftain

    Joined:
    Jun 25, 2010
    Messages:
    10
    In response to your first post, your PyScenario, which is AWESOME and extremely easy to use.

    In response to your second post, I'm very familiar with the XML and WBS, and hav been making mods for myself using those two things for quite awhile now. Thanks for the information on the python and the DLL.
     
  7. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    Oh, this actually means a lot since I gather you have no prior programming experience. :king: So you are joining the beta-testing team, then? :D

    As I said, you should probably start with altering the AD 600 scenario. Know however that there might be some issues with running RFC on a custom scenario, but I'll do my best to sort it out for you. (Someone else actually tried converting a AD 1775 savegame into a WBS file, but that never worked for some odd reason. Lets hope we can manage better...)

    Not to worry you too much or anything. :rolleyes: I'd suggest you work with the scenario file directly though, and just change the starting turn (346). If you use World Builder to alter the map, save the scenario in another file with another name first. Then copy-paste only the map portion of your custom scenario into the original scenario - or vice versa. Then you can manually edit all the players and teams and whatnot. (World builder will only mess things up for you.) Also note that changing some settings (like Techs or diplomatic relations) in the WBS has no affect on the RFC mod. (For whatever reason.) These changes need to be done in the Python portion of the mod. But lets not get ahead of yourselves. :p

    Take your time to familiarize yourself with the PyScenario documentation, so that you get a feel for what it can do for your mod. If you need some feature not currently present, I can either add it for you - or I can write up some proper custom Python code for your scenario. I'm not gonna touch any C++ for now however. :p
     
  8. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    I just realized something. Going with the notion of a third AD 1775 scenario, there is actually an easy way of getting a Confederate Civ!

    Rhye only uses the Celts in the 3000 BC scenario, but the Celts do double as the Byzantine in the AD 600 scenario. Its just a matter of setting another Civ as that player in the scenario file. So you change it to Confederates in the AD 1775 scenario, then.

    It would still only be a minor Civ thouhg, so you wouldn't be able to play or contact them, but its still a step up from using an Independent Civ. :king: (Making a minor Civ into a regular one is hard, since much of the code only looks for Civs up to America as the major ones. And if you mess around with the order of Civs, then you brake the entire mod.)

    Well, nothing is entirely impossible, so you can always improve on things later. Just see a playable Confederacy as you ultimate end goal and you'll be fine.
     
  9. civfanatic13

    civfanatic13 Chieftain

    Joined:
    Jun 25, 2010
    Messages:
    10
    Working on building the scenario, changed the game turn, but when I load it up, the game says its turn 0 and were in the stone age :(

    I'm looking through the sword of islam and the 1500 ad start to see what I can find.
     
  10. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    I wouldn't worry about changing the date at this point. In a worst case scenario we can solve this with a line of Python code:
    Code:
    CyGame().setGameTurn(346)
    Its a dirty fix and you don't even have to worry about where it goes at this point. I think you should have your hands full trying to setup the world in AD 1775...

    Remember that you only have to do the map, the cities and the units in the World Builder. The rest is done directly in the WBS file (with a text editor).

    edit: The reason you would have issues changing the start date for the scenario is probably that Rhye has some Python code in the RiseAndFall.py file that fires on either turn 0 (3000 BC) or turn 181 (600 AD), so we'd have to review what is there and add corresponding code for turn 346. But you don't need to worry about it - once you have the WBS setup I can give this a try myself. Because it involves programming. (You will have to step in and fill in the information gaps however, like what civics are active, who has contact with who, what starting techs everyone has, et cetera. So there will be some coding for you too. :p)

    One thing we will need to figure out however is how to identify the AD 1775 start for the sake of Python. Currently Rhye uses a somewhat unorthodox method that involves checking whether or not the Egyptian Civ is playable or not. Because it is in the first scenario, but not in the second. Once you get all the players in order in the WBS (the definitive lineup), then we can start looking for a way of differentiating between this scenario and the others.

    So there is no hurry whatsoever with fixing the starting year.
     

Share This Page