Colonization of the Moon -- The Code Extensions Thread

Or we could get back on topic. I shall endeavour to anyway, with the following insightful and deeply meaningful question:

Can we change the gfx for the artillery barrage? That plane looks very nice, I'll agree, but isn't an aerodynamic propeller plane slightly out of place on the moon? Or am I just being funny?
 
I think Belizan plans on stealing the fireball from Kael's FfH, which would be fine by me. It's spectacular, at least the version I playtested for him.
 
So here's the thing. With a few exceptions (like the civics), the units I create and put out, are not meant to be... uh... what's the word. Set in stone? Finalized? Thought out? Have any thought in them at all?

The values of the units are arbitrary. Just place holders for me to get the functionality working. The fact that my baseturret had a strength of 3 was not my way of saying "I think turrets should have a strength of 3", but rather, i had to have a strength value, so I put one in.

Similarly, the idea that Barrages look like planes is not that I think planes make a good model for artillery barrages, but rather that I didn't bother going to get some other graphic. I suggested we gear Kael's fireball (fire elemental I think, technically), but I hadn't really intended to do it myself as, for merge simplification purposes, I want to avoid touching the graphics (art) or xml dirs as much as possible. You all should feel free to change around whatever you like of those. The same goes for the civics I'll be releasing hopefully later tonight. Only some of their features are hard coded in the mod, and changing them will be a non-trivial amount of work. But the parts that are in the xml files--feel free. Generally, the only thing that will cause trouble if you change them are the tags (Unit type, unit class, building type, etc. names--e.g. UNIT_BASETURRET, etc.). In most cases I have collated all the tag values into the Config.py file so new ones could be added by "non-programmers". This file could probably be better documented, but matt, for instance, I'm sure could add to it. Not all of the facilities are modable this way but most are. None of the other xml settings matter for the code. That doesn't mean, however, that you might not get undesirable side effects (like changing the tech prereq on the TE promotions to NONE from TECH_NEVER). Code still works. But you didn't want to do that.

8).

BTW, who should I coordinate with to hand over the civic stuff?

Also, JBG!!!! Woodelf seems to think that he has done nothing with civics. Are you/have you checked over the five main civic categories and validated them?
 
Yes. The five main civic type all work for now. They aren't wildly inappropriate and they seem to be behaving themselves. We should leave off the more advanced options until the beta. Those values in the bible were only meant to be guides, and I wrote them before I understood the limitations of the XMLs. For now, they work, so we should concentrate on more vital areas of the mod (aside, say, from enacting balance changes).

What's all this talk about civics? :scared:
 
So I've been thinking about how to implement Terrain Attrition. Ok, not how to implement it, I mean more.. How to structure my implementation. Not that anyone asked me for it, so maybe I shouldn't be asking these sorts of questions 8). Still, I'll give it a shot.

I've flipped flopped over a number of systems, but this is what I'm thinking about doing atm...

A) Create a function which would return a "survival skill" rating based on the unit, terrain/plot information and tech.

B) Create a function that would return a "supply category" or maybe a familiarity category--whatever; based on distance from allied territory, size of the map, and whether you were in "owned" territory (at war or via open borders agreement).

C) Create a dictionary which would index terrains to a closure (mini-script) which would decide, based on the terrain, survival skill of the unit and supply category whether the unit should suffer attrition damage, and another closure which would use those same factors to determine how large the attrition damage should be.

There are a number of "redundent" steps here, but, it's all about how to break up the problem in a way that makes sense when you think about it, and let's you make consistant rules. (And to allow for the eval closures to be "simple")
 
Sounds good to me. So long as techs or upgrades can lessen the effects of attrition. Or promotions that could combat attrition of which we'll never know how well the AI does... A special building that helped would be good, but again we'll need to see how the AI handles it.
 
Belizan - how in python could you rig it so each civ can only found one religion? I'm toying with adding some just to see how they play, but I hate when civs found more than one religion!
 
Well, you'd want to define your own alternate rules for religion founding. So, let's say you did the most obvious thing. Rather then the first to discover tech X, you wanted it to be the first to discover tech X who hadn't already discovered one.

You'd change the techs to not start any religions. Then you'd override OnTechAcquired and check by hand when a player discovered a religion founding tech all the other players to see if they had founded that religion yet, and if this player had already founded a religion. If both checks come back false, you have him found the religion, you pick a holy city, etc., etc. Pretty straightfoward.
 
Does that mean it's something you'd have to do in python or me in XML? :)

And by straightforward does that mean you can and will do it? :):)
 
woodelf said:
Does that mean it's something you'd have to do in python or me in XML? :)

And by straightforward does that mean you can and will do it? :):)

It's largely a Python problem, but we'd want to do it in two passes. First, you'd create the religions in XML. You'd also have to make a list of tech-religion relationships, and you'd have to verify that you wanted your religion foundings to work as I outlined above. If you want a different mechanic, best to describe it now. One you had that done, I could add the python support code.
 
Sounds good. I was going to post the religion ideas and wait for feedback, but it seems like everyone is studying or busy so it'll be easier if I just do it and then see what everyone thinks. I'll put them into XML and send them off to you sometime soon.

And religion is the game mechanic, but to me it's more an ideology for our mod.
 
woodelf said:
Sounds good. I was going to post the religion ideas and wait for feedback, but it seems like everyone is studying or busy so it'll be easier if I just do it and then see what everyone thinks. I'll put them into XML and send them off to you sometime soon.

And religion is the game mechanic, but to me it's more an ideology for our mod.

Yeah, we've had the idea to use religion for ideology about six times now, from different people, lurkers or ourselves 8). So I think in concept, at least, you're planting in fertile soil. Lay em out, verify that you want it to be a simple 1st person to discover the tech who hasn't already founded a religion, and tell me which techs go with which religion. All shall be as it should 8). Unless I run into a gotcha 8). hehehe 8).
 
I think I started the discussion, restarted it, and am resurrecting it yet again. :D It's simply too big of a mechanic to ignore. Plus the way Kael did FfH religion-specific civics is cool and offers variety in that regard.

And thanks. Now that I now it can be done with your help I'm more apt to work on it. ;)
 
Back
Top Bottom