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

Roll Call! (Post here to let others know you show up from time to time)

Discussion in 'Civ4Col - Creation & Customization' started by MDoulos, Feb 5, 2017.

?

How many people do you think regularly visit the Civ4Col Mod forum?

  1. 1-10

    18.8%
  2. 11-20

    6.3%
  3. 21-30

    12.5%
  4. 31-40

    18.8%
  5. 41-50

    18.8%
  6. 51+

    25.0%
  1. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,117
    I'm actually finishing up on rewriting precisely techs and civics (among other things).

    What was used in M:C and was planned for RaR: (vanilla BTS approach) can be described with this single example:
    Question: can the player use unit 7?
    1. look up UnitInfo for unit 7
    2. get UnitClass (say it's 3)
    3. get civilizationType from player
    4. get civilizationInfo for said type
    5. get unit overwrite array in that civ info
    6. get unit for UnitClass 3
    7. check that this unit is 7 (or an instant False reply)
    8. get all techInfos (loop)
    9. foreach, check that the player has the tech and if it allows said unit. Sum up all allow values
    10. the player can use the unit if the allow is positive or allow and max allow value in xml are both 0
    I rewrite this into
    1. ask player for allowUnit array
    2. look up index 7
    3. unit is allowed if number is greater than 0
    Not only is this faster than step 1-7 (vanilla, hence RaR right now), it also doesn't slow down when the numbers of techs increase. This check also checks allow conditions for civics, traits, eras.... you get the idea. This is one of the reasons why I started over on my own design. I wanted something, which scales well without slowing down and having code, which is unaffected by size of xml files is the ultimate goal for allowing scaling.

    This is just one tag. There is more than a hundred tags, which works this way, each with unique code in CvPlayer as well as in places where it's used. This means it has code in almost all files and I haven't even mentioned the entire system build into it to figure out when to update the caches and ensure that caches using caches as input will also be updated when needed. I started on this in 2015 and it's not ready for release yet. It has become playable, but there are still a few "this needs to be done before release" and then a lot of stability testing.

    Due to the size of this, both in terms of time invested and simply the amount of lines in the code, I say moving it to RaR is not really an option. However the goal of M:C is to made it possible for as many mods as possible to use the DLL (removing the need to move code around), which mean it's not unfeasible to convert RaR into using the M:C DLL file, hence gaining access to the same features. Sure there are some RaR only features, but most if not all are on the wishlist for M:C and they are easier to move. Still not a task, which can be done in a weekend though.
     
    Last edited: Feb 12, 2017
    Marla_Singer likes this.
  2. MDoulos

    MDoulos Chieftain

    Joined:
    Feb 5, 2017
    Messages:
    59
    Gender:
    Male
    That's awesome. Yeah it is definitely a fun game!
     
    KommissarReb likes this.
  3. MDoulos

    MDoulos Chieftain

    Joined:
    Feb 5, 2017
    Messages:
    59
    Gender:
    Male
    Great ideas. I take it you're not a programmer yourself? Have you tried to implement anything on your own?
     
  4. MDoulos

    MDoulos Chieftain

    Joined:
    Feb 5, 2017
    Messages:
    59
    Gender:
    Male
    I'm under the (probably the naive) impression that coding projects could move fairly quickly when modding games. You're reducing 10 lines of code down to 3, why does it take so long to code then? (Awesome by the way that you know how to do that and have drastically improved the efficiency! :clap:)

    I would like to make a total conversion mod of the game. Should I be prepared to spend years just coding a total conversion (even with your updated DLLs)?

    By the way Nightinggale, what do you think of a series (or a long thread) of posts which go through the games codes at random bits (or methodically) and exposes what the code means, does, and how to edit it, while at the same time exposing bugs and inefficiencies (if we use the vanilla dll)? I think that would be good for me personally to pick up programming in C++ and Python, but also we could have that as something public and accessible for all modders to learn how the game's coding works and how to modify it.
     
  5. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,117
    1: I haven't been working full time
    2: it's a candidate to being the biggest code change in any mod ever.
    3: it's not 3 lines of code. It's actually thousands of lines. It's like "drive to the airport" can be understood by a lot of people, but it lacks the instructions on how to actually do it.
    4: this is the "read data at runtime" part of the code. It only works if there is some code to provide the right numbers. It's not like it is a replacement for the actual calculations. It's just calculating once instead of each time the number is used. Providing the right numbers is where most of the code lies (which only runs once every time you get a new tech, not 10k+ times every turn)

    Yes and no. It's time consuming and you likely won't be able to do a total conversion in a month. It also depends on what you mean with "total conversion".

    It's an ok idea, except that it would likely be very time consuming for me. Time, which would be taken from programming. I would rather finish what I'm doing right now than write about how awesome it will be once it's finished.
     
    Last edited: Feb 13, 2017
  6. MDoulos

    MDoulos Chieftain

    Joined:
    Feb 5, 2017
    Messages:
    59
    Gender:
    Male
    I see. How many hours would you say you've put into Civ4Col efforts over the past couple of years? Average per week?

    Complete revamp of leaderheads. Replacing talking heads with a smaller, always changing, static image of the current governor of each faction.
    Drag and drop city menu screen where the "building" graphics can be moved around and the spot where you place the workers in the buildings moves with them.
    Rename of almost every unit in the game.
    Each leader (who is regularly replaced throughout the game) has 2-5 traits.
    Conversion of a 1:1 unit conversion to a more realistic 99:1 or whatever the ratio may be in real life. Ex: if it takes 1 metal ore to make a gun, it takes 1,000 to make a cannon. Each tile and production output would also be effected. Such as mines producing 100 ore per turn instead of 5-6.
    Removal of continental congress.
    Tech tree (which your code would obviously be the base for!)
    Dynamic display of resources in each city. Meaning that if a city only has horses, guns, and tools. Only horses, guns, and tools show up at the bottom instead of the current system of showing 0/100 of each resource along the bottom resource bar of the city screen. This would clean up the UI of irrelevant information (resources that aren't in the city and aren't harvestable nearby).
    Drag and drop resource icons. Rearrange the resource bar. If you want guns to be to the left of tools. Drag it to the left. Or vice versa.
    The death of natives by disease. Native cities who live close to or border European players will have a 50-100% chance of losing 50-100% of their population randomly in some tragic events 20-50 turns in to each game. This event would happen only once near the beginning of the game. And would decimate native numbers along the newly European coastlines and leave them stronger inland.

    Those are the ones off the top of my head. What time estimate would you put on that?

    That's understandable! How long do you think until your project is finished?
     
  7. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,117
    I intentionally do not consider time spent on modding. It's a free space where I can do what I want, when I want and when I have the time and energy. No stopwatch will ever be allowed to ruin that.

    I not sure what you mean by this. Changing to static images shouldn't be hard, but why smaller and what precisely do you mean by "always changing"?


    Trivial, but why?

    Changing number of traits is strait forward, but changing leaders requires some new code. The actual change shouldn't be hard to do, but what should trigger the change and how should the next leader be picked?

    Planned addition, though 100/turn sounds insane. I'm more in line with changing warehouse capacity and max load in transports.

    Should be a matter of emptying an xml file.

    Fill out xml.

    That's actually quite hard to do. It was hard enough to just hide yields, which haven't been invented yet. Now you want to hide based on something as tricky as "can the city produce this or is it stored"? What happens if the answer to both happens to be no, a player opens and while it's open, a transport unloads?

    Sounds really hard to implement.

    I don't even know where to start on that one.

    That's really hard to say. It could take ages unless you ditch the hardest parts.

    First of all, currently done is defined as next release. It has been decided what it will contain and which ideas will have to wait, because the next release is overdue. This means done is not the end of the mod or development.

    I can't really tell how long it will take to finish up everything. From a programming perspective, it might not take long, certainly not relative to how long it has been in development already. Next is correcting all errors in xml, which occurred due to being auto converted to the new xml layout. After that there is the task of testing and fixing all issues found.

    In other words asking how long it will take is somewhat equal to asking "how many undiscovered bugs do you have in your code?", which is not the easiest question to answer ;)
     
  8. MDoulos

    MDoulos Chieftain

    Joined:
    Feb 5, 2017
    Messages:
    59
    Gender:
    Male
    Fair enough!

    What I mean is something similar to what you and I discussed in this other thread awhile back (I'm Sanotra). See link:
    https://forums.civfanatics.com/threads/radical-concepts-to-change-the-game.484859/page-2

    If you choose George Washington (English) in Vanilla. Your faction will be led by Washington the entire game, despite the fact that he would thus technically be 200-400 years old by the end of the game. My system would replace George Washington with (insert random English sounding name here) after 20-30 turns. After another 20-30 turns, another replacement happens. Each replacement leader has their own leader traits. Thus in effect, your nation's leader traits (as well as leader name) changes every 20-30 turns.

    The mood of the game. + a change in perspective. I would prefer to present each unit (Expert Fisherman for example) as a company or industry, rather than an individual person. Thus in my example, Expert Fisherman, becomes Fishing Industry (Level 2) / instead of Fishing Industry Level 1 (Regular Fisherman), or Large Fishing Industry / instead of Small Fishing Industry, or Thriving Fishing Industry, or even Fishing Company or Fishing Guild. My preference would be Fishing Industry or Fishing Company. Thus your towns and cities at full size would be populated with dozens of "Companies", rather than dozens of "Individuals". This name change results in the logical conclusion of a single unit representing more than one individual. Agree?

    Each leader would "live" and reign for at random 20-30 turns. 20 turns minimum. 30 turns maximum. The number, if fixed upon creation of the leader, is not revealed to the player. Once the guy's time is up. An event box pops up saying something like: "You're leader [insert name here] has died. Choose a new leader." At which point, similar to Dawn of a New Era when picking the preferred specialist at the start of the game, the player would choose 1 of 3 different choices for randomly created leaders. This all happens in-game in an event box.

    AWESOME TO HEAR YOU ARE PLANNING TO BREAK US OUT OF THE 1:1 or 2:1 resource rations! Sorry for the caps. I'm just really excited about you removing the limitation! Why is 100 per turn insane sounding and not 1 per turn? The player would just look at a higher number is all. 100 instead of 1. All I see is two extra zeros. Resources would be calculated in terms of thousands instead of dozens or hundreds. Seems like it's not a huge leap. What do you mean by you're "in line with changing warehouse capacity and max load in transports."?


    That is exciting to hear too. Tech tree will be just a simple XML change.

    Can a transport unload while the city screen is open? I didn't know that, and haven't played a long enough game in awhile to remember. If so, why not just rerun the if/else statements upon the event that a transport unloads? Or check to see if a transport in town has a resource not yet unloaded, and display the resource.

    Meh. Drag and drop isn't a necessity. Would be nice. What is the difficulty in programming something like that? Isn't there already drag and drop for the units (drag from one building to drop them to work in another)? Why not just apply the same code or logic to buildings?

    What is the process of "starting" these things? Is it hard to know what kind of code will handle such situations? I'm curious as a soon to be programmer.


    Lol. Ok I gotcha. :lol: :crazyeye: When you release what you've got. Will it be precompiled? Because I think my compiler is broken (remember the fan problem).
     
  9. MDoulos

    MDoulos Chieftain

    Joined:
    Feb 5, 2017
    Messages:
    59
    Gender:
    Male
    I should say too, that the reason to do away with 3d talking heads in favor of smaller 2d portraits, is it saves the modder (me or a team) from needing to make the prerequisite 3d assets for the hundreds of new leaders in the game. With hundreds of leaders (new one every 20-30 turns per faction) instead of a couple of dozen, 2d over 3d is much easier to implement graphically.
     
  10. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,117
    I'm not sure I like the idea of changing leaderheads. I still suspect they are way too much work compared to what they are worth to the game.

    Hey, that thread is historic.

    post #31: first post where the option for 3:1 yield production is mentioned
    post #34: first post where what was to become CivEffects is mentioned (which has eaten up all my modding time ever since)

    While I certainly don't like all the ideas there, it is a great thread for creative thinking. It actually ended up being an important thread for colo modding.

    There is the option of having the transport in the city when open open the screen and multiplayer certainly adds the option that lots of stuff goes on while you look at the city screen.

    First problem is that the building locations are all hardcoded. I have moved the location into xml in M:C and with a debug option turned on, it will re-read the special building xml and redraw the screen every X seconds (X being the setting in steps of 1/4 second). This allows modders to change values and see the result nearly instantly, but the player won't be able to move buildings. It's a tradeoff, which I consider good enough.

    The first step is to figure out a concept, which will make the idea in question do what it is supposed to do. How will the computer know when to trigger this effect and how should the effect work and when? Will it happen to natives in plots owned by Europeans? Will it happen to natives just standing next to European units and if so, how will it know that it does that (without making the game really slow with tons of checks). Is there any existing code where it could make sense to piggy-back riding this feature on (like some other feature to check for European presence). Will natives with disease be able to spread it to other natives? How will a native know that it has caught a disease. What about game balance? If it spreads from native to native, won't it produce a continent with virtually no people because all the natives die before the Europeans arrive (this happened in real life. It seems that the descriptions of an empty land for the taking are more likely just objective observations than ignoring natives).

    The only clue I have to any of those questions is to mark a unit with a disease by giving it a disease promotion. While it's a start, it's like "drive to the airport" and the instructions are "start the car". While it's true that it's a valid start, just doing that will not get you to the airport and as such it's useless.

    All releases are precompiled, so yes. I can't remember any fan problems offhand, but if your hardware is broken, you better fix it. If a broken fan prevents you from compiling, it also prevents you from playing.

    EDIT: I just remembered the fan problem. It shouldn't be an issue while compiling. If you really want a non-noisy compilation, do not use a fast option and the compiler will only use one CPU core. This will cool the CPU significantly (hence noise), but it will take around twice as long to compile. I'm not sure about the fan problem during playing though. I will investigate CPU usage prior to release.
     
    Last edited: Feb 15, 2017
  11. MDoulos

    MDoulos Chieftain

    Joined:
    Feb 5, 2017
    Messages:
    59
    Gender:
    Male
    Wow I didn't realize my thread made such an important thread. It makes me happy because as a non-modder at the time, my goal was to stir up other people to action with some or all of my ideas. A "historic" thread, and it was mine. Awesome! :) As you can see. I still have plenty of Radical Concepts to Change the Game! :science::science::science::science::science:

    As a fallback then, would it be easier to turn all of the coloured icons and the boxes that have 0 resources grayscale while leaving the coloured ones for resources the player has in stock? I'd like to see some sort of visual separation between the two. In Stock (Colour, bright). Not in Stock (Greyed Out, dim).

    When you say hardcoded, do you mean in the unreachable exe? Otherwise, couldn't we change the variables? If it isn't editable, why would Firaxis not release such a trivial value to the mod community? Why wouldn't they just open it all to the mod community???? :wallbash:

    Here's a simple idea. Only the native factions which have had their lands encroached on have the negative relational attribute of " -# Your way of life is threatening to ours. " A single check would look for this stat within the first 20-50 turns and no later, and would only select native factions which border the Europeans. Those native factions would randomly lose 1 unit per turn in every city. For a total of 5 turns. For smaller maps, this would wipe out many of their towns, leaving 1 or 2 units in just a few surviving towns. So the player is not confused. An event pop up would show up explaining the natives are dying due to disease on turn 1 of the tragedy. This way the event destroys neighbouring tribes with one check and one loop, and doesn't touch other native factions. Am I right?


    Glad you remember. I was just about to respond before the edit! The compiler doesn't speed up the fan at all. Quiet as a mouse in the crawlspace. Only during play. If you send me a link to a version of M:C already compiled, I'll give that a go. Because my best guess is it is a compiler error on my end. Simply trying something precompiled show confirm or not. Like I said before, all of the other precompiled mods work quietly.
     
  12. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,117
    Sounds right except for the fact that yields are displayed on the map. How do you think the engine will handle displaying 100 ore on all 30 visible hill plots? How do the player manage to count if there are 30 or 100?

    Great. You take responsibility for that thread. Now I can sue for lack of payments. I didn't work full time, meaning I will be kind and reduce it to 6 months payment for an engineer :lol:

    Actually it's not directly your ideas, which sparked this, more like the conversation, which you initiated. I still think taking most of your ideas for face value would make the game worse, not to mention that it would take forever to code.



    Not like that. It is in the main interface python file. However vanilla hardcodes the values in that file on file init and then all the code assumes the values to never change. Since it's the main interface file (not a subfile), it's together with the code for adding buttons and stuff when moving units around. This means init is on game start and that's it. Restart the game to run the init again. Changing this setup will require a lot of work, particularly because it's that file where lots of different features are mixed together. It's way easier to mod something like the domestic advisor because that's one file where 100% of the contents is for that screen.

    I did mention the ability to reload building locations from xml with live updates. There is a tradeoff from doing so. The screen gives a flash when updating and dragging units breaks. This is why it's a feature, which can be turned on for modders, but not used during normal gameplay.
     
  13. MDoulos

    MDoulos Chieftain

    Joined:
    Feb 5, 2017
    Messages:
    59
    Gender:
    Male
    Easy. Instead of :c5food::c5food::c5food::c5food::c5food::c5food::c5food::c5food::c5food::c5food::c5food::c5food::c5food::c5food::c5food::c5food::c5food::c5food::c5food::c5food::c5food: it would be :c5food: x 21

    Lol. No comment. I can't afford! :lol:

    Not what any fledgling game designer wants to hear. That hurts right in the feels. :sad: :blush:

    If it is hardcoded based upon which file it is in. Why not just move the code and the file to which the codes are calling from to a different standalone file?
     
  14. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,117
    That would be nice, but the icon placement on the map is hardcoded inside the exe. What we can do is to set which icon to display and how many.

    Ok, maybe that was a bit harsh, but implementing everything you propose will take years. It would be nice if you had even just a little more insights into the code/xml layout, which would give you a much better idea of what is doable and what isn't.

    The problem is that it's spread across the file. Splitting it into a different file is as tricky as just fixing it in the existing file.
     
  15. MDoulos

    MDoulos Chieftain

    Joined:
    Feb 5, 2017
    Messages:
    59
    Gender:
    Male
    :cry: *takes a minute to cry internally about something I can't change and therefore won't complain about*

    These are the sorts of things that make me wonder how hard it would be to make my own game. From scratch, with modern tools. Once I get good at programming, I'm sure I'll be trying a lot of that.

    Whenever you mention things like it would take years, it makes me think that programming is an extremely time-consuming experience. I thought programming would be lightning fast! How do game makers produce games so fast? Just have a big paid professional team?

    K. Gotcha. What did you think about my native disease tragedy solution?
     
  16. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,117
    If it is as easy as it sounds like you suspect it is, then why haven't anybody from the modding community done it by now? Making something from scratch is much harder than modding existing code. There is also a legal aspect. We are free to make a civ clone in a mod (that's the whole point), but if we make one from scratch where the player doesn't need to buy civ4col, then you could end up violating intellectual property. In a way modding is a free ticket to make your own game, which looks a lot like the game you make the mod for without the risk of legal issues of making your game look too much like the original.

    Also dream on if you think making a new game from scratch has even a remotely hope of beating modding an existing game.

    Years is under the assumption that it's done by the usual modder speed.

    Professionals work differently. First of all, they are schooled. When making something as big as civ4col, it will be a team of people trained in different fields, like management, code planning, AI, 3D graphics etc. Each person is paid to work at say 40 hours a week. They never encounter "I got a lot of homework" or "I got busy at work" or anything like that, meaning they can progress more steadily. There are also shortcuts, like "it will take 2 people 4 months to make this part. We can buy it for the same as what 1 person is paid for two months". There is also the aspect that you often get better documentation on how to use something if you paid for it. Unsurprisingly programmers can work faster if they can just look up what they need instead of spending all day figuring out how to use some undocumented feature.

    Having said all that, if you want to make something big, it still takes time. Wasteland 3 was announced with the following video when it tried to raise money for development. Even with $3 million and a game engine, which provided that video, they still need 3 years to make the rest. Proper development is time consuming (though they didn't say how much is programming and how much is map making, character voices, 3D figure design etc).

    Spoiler :

    Having said all that, programming can be fast. It really depends on how much you plan to do. A trained programmer could likely do pacman in a single weekend.

    No idea. I have been focusing on M:C. I decided to implement one idea, which came from your thread. Just let me finish before you give me more :crazyeye:
     
  17. MDoulos

    MDoulos Chieftain

    Joined:
    Feb 5, 2017
    Messages:
    59
    Gender:
    Male
    You're right. The new creation would have to be drastically different than Civ4Col. It would have to be obvious that it was entirely different game. Different rules. Different assets. Different feel and experience. It would be fairly straightforward with one of those professional teams we're talking about. but... :shifty: I don't have deep enough pockets to afford a ten-twenty man professional team for 3 years. Not yet...

    Shoot for the stars. Land on the moon. I like dreaming. It's what keeps me learning new skills and pushing out of my 9 to 5 comfort zone. But I do understand the colossal challenge, that's why I spend time trying to mod this game rather than making it from scratch.

    I want to be on one of those teams!

    Never played the game. But that video looked gritty! It'd be nice if developers released how much they paid on such and such and how long each thing took.

    Looking forward to seeing it! Did you tell me what the idea was?
     
  18. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,117
    That's kind of besides the point and I'm sure they will try to improve graphics. My point is that the game look somewhat (or completely) playable, yet it still requires a team of professionals to work full time on it for 3 years before it's actually ready to be played.

    CivEffects. It's a collection of xml files, which all have one thing in common: each index in each xml file can be owned by a player, like techs. Either a player has the tech or not.

    The idea is to merge those to use a standard code, which in turn will give them a standard set of tags. For instance say I start with civics. Then all civics will have the civic abilities (obviously). Then I add techs. The civeffect base will now know of all the abilities from both civics and techs, meaning techs can make use of what was civic only. Next I add traits. Now civics, techs and traits can all do everything, which was possible by either civics, techs or traits. The current plan ends up with a total of 9 files (read: 2 more to add).
     
  19. ADHansa

    ADHansa Chieftain

    Joined:
    Jan 26, 2006
    Messages:
    136
    From my steam account

    Sid Meier's Civilization IV: Colonization

    You've played 4127 hours (but alot of them just in windowed out background mode)
    Last Played Today

    Still playing, still my nr:1 game, still modding, but taking 6-24 month breaks now and then.
     
  20. Kendon

    Kendon Chieftain

    Joined:
    Aug 23, 2012
    Messages:
    144
    Location:
    Rocky Mountains
    I check this forum once or twice a month. I guess that's regular.

    Right now I'm playing two games with opposing strategies on RnR 2.5. Denmark is everyone's friend. France is everyone's enemy. The Denmark game is just ready to declare independence at 30 hours of play and France is getting close at 35.

    I don't pay a lot of attention to the programming. The trade-offs in gameplay are what I enjoy. In version 2.5 Hessians for the first time are the powerful melee troops, so getting along with the King matters. Luckily the more his colony wars, the more pleased the King.

    France started by defeating and occupying the entire Swedish and English colonies, but never attacks any of the native nations, one of which asked for war against Russia, immediately under way. Recently Spain attacked from the south with a large expensive army, now trapped in the middle of New France. New Spain is blockaded and the starving citizens are starting to flee. New England just declared war on New France again, but I can't see from where. It's rare to see another European.

    I play other games but this is where I spend the most time. Playing takes about six months from landfall to independence. I'm grateful for the intricate modding. I should make more of an effort to understand how it's done.
     

Share This Page