Wonders and Projects

+1 gold per a building is not even necessary through python. All you need is to make an event, through xml. Although that means there will be the little pop-up screen, which some may not want (personally I wouldn't care less), but the advantage is that you don't have to take a risk with the python voodoo.
 
+1 gold per a building is not even necessary through python. All you need is to make an event, through xml. Although that means there will be the little pop-up screen, which some may not want (personally I wouldn't care less), but the advantage is that you don't have to take a risk with the python voodoo.

I think you mentioned earlier that you wanted to use the event system more dynamically, and I was wondering a few things about this:

1) Can I do +1 gold with an event but not have an alert/pop-up or does that necessarily have to occur.

2) Could I use the event system and pair it up with projects? If this is the case what are my limitations with these events?
 
From what I know -

1. I think theoretically it is possible, through python (I'm not sure though, The J would (obviously) be the one to ask). At the least, through XML, you can choose whether or not to have the World Display Messages (whatever it's called) or not, you know, the message that pops up near the top of your screen when an event happens. So my point - at least with XML you can prevent the world message from popping up, but if you wish to remove the actual "Oh no, event X has happened! What shall we do? Choose either choice 1 or choice 2!" message will still be there.

2. For projects, I'm not sure if that's doable. So far as I know it is not, though you may be able to do it with python, not so sure on that one.


So basically, again, to reiterate, the problem with having an event-based wonder is that at the worst there will be the little pop-up that asks the player what course of action to take (in the case of a wonder, there would be one option of course, which would implement the effects). In WoL the awkwardness of this is somewhat alleviated as I am intending to add several wonders with event-based effects, but I think you probably may not rely too much on these event-based wonders, so, yeah, it may be a little awkward.
 
Well, what I was considering doing in that case was having a "monument" available with each project. So that when the project is finished, if I have to have a pop-up, I could at least create a dummy building so there's an excuse for the pop-up. So it will give a blurb about what happened, like "blah blah blah, women can now vote, blah blah blah" and then give you two options, one would be the regular effects plus you purchase a monument (which will cost a decent amount of gold) that adds X amount of culture to the city, or you just get the regular effects. I don't know, it is still a new idea, and as far as I know there are not many mods with a bunch of projects in them.
 
If you go that way, I could even imagine solving the UU wonder this way. You can choose to have +1 happiness or +1 gold to your colosseums/stadiums.

The pop-up could be something like this:
The Flavian Amphitheatre/Great Colosseum is finally finished to represent the glory of our civilization:
- Let it be a symbol and inspiration of organizing even greater events in our colosseums/stadiums (+1 happy)
- No need of greater events, just use up the increased attendance and turn it into profit (+1 gold)
 
If you go that way, I could even imagine solving the UU wonder this way. You can choose to have +1 happiness or +1 gold to your colosseums/stadiums.

The pop-up could be something like this:
The Flavian Amphitheatre/Great Colosseum is finally finished to represent the glory of our civilization:
- Let it be a symbol and inspiration of organizing even greater events in our colosseums/stadiums (+1 happy)
- No need of greater events, just use up the increased attendance and turn it into profit (+1 gold)

That's a great idea!

cybrxkhan, how possible is this?
 
^That is certainly possible, and pretty easy to do.

As for the projects, I don't really know if that's possible, since the projects are a different category. I'm betting that you should look into python, but if that doesn't work, well...
 
^That is certainly possible, and pretty easy to do.

As for the projects, I don't really know if that's possible, since the projects are a different category. I'm betting that you should look into python, but if that doesn't work, well...

To avoid adding more new material than is necessary, I think I'm going to ditch the idea for projects, and maybe try to integrate them into the Deluxe edition.
 
To avoid adding more new material than is necessary, I think I'm going to ditch the idea for projects, and maybe try to integrate them into the Deluxe edition.

That doesn't sound good :eek:
We had some -great- project ideas

I would certanly vote for adding them, anyhow it's possible (even in python)
 
Question, do you know the Wonder in Civ 3 - Theory of Evolution? and how it gi ves a civ 2 free techs? Is it possible to implement that in your mod or in game itself?
 
There is already the CERN Large Hadron Collider wonder which gives a civ one technology and a free Great Scientist, I think that is pretty much the same thing in a way.
 
Well, the playtest has had its bumps so far. :(

This is probably the first playtest where there has been a real performance hit and I was thinking maybe we should take out one of the wonders because of this. I was thinking Machu Picchu since it has the most code and doesn't actually work the way it was originally intended to work. After all; "Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away."

What does everyone think?

Personally, I'd rather not take it out, but if it helps with performance I think I might be all for it.
 
You could just give it an effect that isn't so code-heavy.
 
Before deciding on any of the wonders, you should try Xyth's suggestions:

I had a quick look through some of the Python you've added. It seems you've re-enabled 3 python callbacks that are off by default (because they slow down the game):

USE_CANNOT_CONSTRUCT_CALLBACK
USE_CAN_BUILD_CALLBACK
USE_ON_UNIT_CREATED_CALLBACK

I'd suggest temporarily disabling them to see how much speed difference it makes. I'm assuming that the Flavian Amphitheatre uses these, does anything else? These Python callbacks should really only be enabled for major features, especially the first two.

I also wouldn't be surprised if the slavery code is a part of the issue. It's called every single time there is combat, whenever a city changes owner, and every time a city updates it's production.

They're all in Assets/XML/PythonCallbackDefines.xml. The ones set to 1 are enabled, the ones set to 0 are not. Switching them off shouldn't cause any errors, just several sections of pythons won't ever get run. I'm not quite sure which sections these are without a more thorough examination of everything you've added.

I haven't got time to properly test it myself atm but switching these off temporarily should give some indication of how much speed could be recovered without having to comment out huge sections of python.

EDIT: Would be worth looking at the Next War compilation you used originally, see if any of these callbacks were enabled for that or if all were enabled subsequently.

EDIT2: Just saw your PM. I'm a bit busy this weekend but I'll have a look through and see if I can figure out what uses what.

Actually it looks like it's much easier than I expected to work out what uses which callback. Here's the list:

USE_CANNOT_CONSTRUCT_CALLBACK
- Used by Next War for arcologies and shielding
- Used by Machu Picchu

And unless I'm misunderstanding something it looks like USE_CAN_BUILD_CALLBACK and USE_ON_UNIT_CREATED_CALLBACK are not used by anything at all! Definitely switch these two off and hopefully that will see a decent speed increase.
 
You could just give it an effect that isn't so code-heavy.

That's true, but I am always reminded of something a good modder once told me when I began modding. He said that a problem many mods have is that they add too many things for the sake of adding them. Examples would be a really good looking unit, that has no real place in the mod, is added simply because the unit looks good. I think the same rule applies here. I wanted Machu Picchu in because it is a unique wonder from an area of the world that has no wonders. Which is fine, and in and of itself does not go against what this modder told me.

The problem is, gameplay shouldn't suffer just to add something cool. And in a sense this wonder may be a bit unnecessary. I'm not sure why the mod isn't performing well right now, it was performing perfectly fine for me up until the last few changes I made/right before I released the playtest. Perhaps it is the graphics (which I'll try to cut down on for the next version), maybe it is too many leaders, maybe too much python. Maybe a combination. Either way, we're getting to a point where the mod is nearly finished, and this would be a good place to start putting things on the chopping block.

The first thing I'm going to do, which will probably be unpopular, is remove the super-barbarian civs from the list of plans. I MIGHT still stick with Pirates, I'm not sure, but the Horde and Sea People are out. On a related note, I am going to do away with Barbarian flavored graphics. They don't serve that great a purpose, and since none of the vanilla units are used in this mod (other than the random Infantry or Marine) I don't see a big problem with doing this. It may not make much of a difference in the size and performance of the mod, but every little bit helps. Also certain mesh groups (Celtic, Chinese and Roman archers for example) will be cut down to one model rather than a group of two or three. So over the next few days (as I add the new traits and what not) I'll start shaving off some of the graphics, and POSSIBLY a leader here and there (although this is doubtful).
 
But all these things were already in the 3rd playtest, which had no problems with performance
Before you are thinking of chopping anything, we should really find the cause in the newly added things and change that

I doubt the barbarian flavored units, the archers, and other small but cool things really mean anything in performance...
 
That's true, but they can pile upon eachother and create the issues. So basically, the wonders must be the problem. I think wonders that have code that "fires" often, like Machu Picchu for example (which happens every turn), might be the problem. So maybe I should ditch Machu Picchu for now and see how that works.

EDIT: I just want to clarify something I said earlier because as I re-read it, I could see how one might get confused. I don't mean there will be one archer in the group, I meant there will be one type of archer in the group. Notice how the Romans have one archer with a helmet, and two without. Well I could cut that down to just three of the same archer model. Again, it won't make a huge difference, but if I do this with like ten units it will add up.
 
Top Bottom