• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

Python Performance and Interface Overhaul (PPIO)

How does it make anything EASIER?
Easier for him I guess - he has most of modules.
Other modders just kept one for themselves.
They of course are useful if you keep changing stuff constantly, and they were really useful back before SVN was used.
I wouldn't need anything in modules as I have PPIO and some tools in Notepad++
I think only extraterrestrial stuff could stay modular forever.

Of course there could be multiple building or unit files just like wonders, special and regular buildings are separated from each other in core.
 
Last edited:
is there any reason why The_J mod is turned off?? i went to see if in use and it comes up "blank" ???

was wondering why i could not get my unit after building a farm?? it isnt working now??
 

Attachments

  • python.JPG
    python.JPG
    15.4 KB · Views: 115
  • classic.JPG
    classic.JPG
    325.9 KB · Views: 145
is there any reason why The_J mod is turned off?? i went to see if in use and it comes up "blank" ???
A lot of Python stuff were concentrated into fewer python files.
@Toffer90 knows where he moved stuff from this file.
 
is there any reason why The_J mod is turned off?? i went to see if in use and it comes up "blank" ???
I temporarily removed the code for getting militia units from farms, I forgot about it , so temporary has been a long time now.
I didn't like the feature as it was and figured I'd just remove it until I could think of a better militia feature for that civic, haven't thought of a better feature, so maybe it's time to add it back in. ^^
I think that's the only gameplay mechanic that I rudely removed in that manner.
 
I temporarily removed the code for getting militia units from farms, I forgot about it , so temporary has been a long time now.
I didn't like the feature as it was and figured I'd just remove it until I could think of a better militia feature for that civic, haven't thought of a better feature, so maybe it's time to add it back in. ^^
I think that's the only gameplay mechanic that I rudely removed in that manner.
but where is the rest of the python located at also??
 
Well Natural Wonders must be loaded after My Mods (contains New Cultures), as in Natural Wonders module there are build action additions to cultural work boats - building beacon/lighthouse on Great Reef Barrier feature which is Natural Wonder.
Not necessarily. It depends on the objects involved, here they are Units. In which case they should be in the New_Cultures. Sometimes you need to have the Transaction elements in a separate file to module Master records. I have no idea why and in this case the Transaction file needs to be loaded later than the Master even if the transactions have nothing to do with anything in the Master. This is why there are a lot of zDepend files around.

In this case its two modules interacting with each other.
Not sure if something else in core or other modules needs New Cultures being present.
I think he wanted to keep stuff in modules too.

UNIT_ belongs to New Cultures
_GREAT_BARRIER belongs to Natural Wonders.
Code:
<UnitInfo>
            <Type>UNIT_NEANDERTHAL_WORKBOAT</Type>
            <Builds>
                <Build>
                    <BuildType>BUILD_BEACON_GREAT_BARRIER</BuildType>
                    <bBuild>1</bBuild>
                </Build>
                <Build>
                    <BuildType>BUILD_LIGHTHOUSE_GREAT_BARRIER</BuildType>
                    <bBuild>1</bBuild>
                </Build>
            </Builds>
        </UnitInfo>
        <UnitInfo>
            <Type>UNIT_NEANDERTHAL_CLASSIC_WORKBOAT</Type>
            <Builds>
                <Build>
                    <BuildType>BUILD_BEACON_GREAT_BARRIER</BuildType>
                    <bBuild>1</bBuild>
                </Build>
                <Build>
                    <BuildType>BUILD_LIGHTHOUSE_GREAT_BARRIER</BuildType>
                    <bBuild>1</bBuild>
                </Build>
            </Builds>
        </UnitInfo>
        <UnitInfo>
            <Type>UNIT_GONE_DAU</Type>
            <Builds>
                <Build>
                    <BuildType>BUILD_BEACON_GREAT_BARRIER</BuildType>
                    <bBuild>1</bBuild>
                </Build>
                <Build>
                    <BuildType>BUILD_LIGHTHOUSE_GREAT_BARRIER</BuildType>
                    <bBuild>1</bBuild>
                </Build>
            </Builds>
        </UnitInfo>

@Dancing Hoskuld how that should be done?

This happens a lot in modules. It should be fine as it is all done with old "Master - Update" technology. The Master in this case is the main unit file. The above are Update transactions to the Unit Master file that add in those Builds. Note checking of the resultant unit XML is done after all the transactions are done. It is slightly more complicated than that in that if there is no Master record one will be created the first time an Update transaction is found. This allows for cases where the object is created only out of Transactions.

In the above example, if all the units are in core then this code is good if it is in the Natural Wonders module in the zDepend unit file. If you want to do it in a way that is totally safe it would be better to have AndDepenedency tags for everything not defined in the module. This means
Spoiler Full dependency list for when the unit and builds are both in modules :
Code:
<UnitInfo>
            <Type>UNIT_NEANDERTHAL_WORKBOAT</Type>
           <AndDependencyTypes>
                       <DependencyType>UNIT_NEANDERTHAL_WORKBOAT</DependencyType>
                       <DependencyType>BUILD_BEACON_GREAT_BARRIER</DependencyType>
                       <DependencyType>BUILD_LIGHTHOUSE_GREAT_BARRIER</DependencyType>
             </AndDependencyTypes>
            <Builds>
                <Build>
                    <BuildType>BUILD_BEACON_GREAT_BARRIER</BuildType>
                    <bBuild>1</bBuild>
                </Build>
                <Build>
                    <BuildType>BUILD_LIGHTHOUSE_GREAT_BARRIER</BuildType>
                    <bBuild>1</bBuild>
                </Build>
            </Builds>
        </UnitInfo>


Spoiler If the unit is in core :
Code:
<UnitInfo>
            <Type>UNIT_NEANDERTHAL_WORKBOAT</Type>
           <AndDependencyTypes>
                       <DependencyType>BUILD_BEACON_GREAT_BARRIER</DependencyType>
                       <DependencyType>BUILD_LIGHTHOUSE_GREAT_BARRIER</DependencyType>
             </AndDependencyTypes>
            <Builds>
                <Build>
                    <BuildType>BUILD_BEACON_GREAT_BARRIER</BuildType>
                    <bBuild>1</bBuild>
                </Build>
                <Build>
                    <BuildType>BUILD_LIGHTHOUSE_GREAT_BARRIER</BuildType>
                    <bBuild>1</bBuild>
                </Build>
            </Builds>
        </UnitInfo>

And what is there would be fine if everything was in core.

@Dancing Hoskuld how that should be done?
Most likely you missed that when I added build actions to cultular workboats.
Why would I be involved at all? Natural Wonders has been a core option for a very long time. If you are making changes to a module it is your responsibility to find out how to make the bits play together nicely.

That's the coding I'm talking about - not DLL stuff. The amount of dependency stuff you have to write ends up getting head-swimmingly complicated the more modules we have.


How does it make anything EASIER?
You only have one object in a module. One bonus or one building etc. No module has more than one object and all its relationships to other modules is well defined.
 
In the above example, if all the units are in core then this code is good if it is in the Natural Wonders module in the zDepend unit file. If you want to do it in a way that is totally safe it would be better to have AndDepenedency tags for everything not defined in the module. This means
Spoiler Full dependency list for when the unit and builds are both in modules :
Code:
<UnitInfo>
            <Type>UNIT_NEANDERTHAL_WORKBOAT</Type>
           <AndDependencyTypes>
                       <DependencyType>UNIT_NEANDERTHAL_WORKBOAT</DependencyType>
                       <DependencyType>BUILD_BEACON_GREAT_BARRIER</DependencyType>
                       <DependencyType>BUILD_LIGHTHOUSE_GREAT_BARRIER</DependencyType>
             </AndDependencyTypes>
            <Builds>
                <Build>
                    <BuildType>BUILD_BEACON_GREAT_BARRIER</BuildType>
                    <bBuild>1</bBuild>
                </Build>
                <Build>
                    <BuildType>BUILD_LIGHTHOUSE_GREAT_BARRIER</BuildType>
                    <bBuild>1</bBuild>
                </Build>
            </Builds>
        </UnitInfo>


Spoiler If the unit is in core :
Code:
<UnitInfo>
            <Type>UNIT_NEANDERTHAL_WORKBOAT</Type>
           <AndDependencyTypes>
                       <DependencyType>BUILD_BEACON_GREAT_BARRIER</DependencyType>
                       <DependencyType>BUILD_LIGHTHOUSE_GREAT_BARRIER</DependencyType>
             </AndDependencyTypes>
            <Builds>
                <Build>
                    <BuildType>BUILD_BEACON_GREAT_BARRIER</BuildType>
                    <bBuild>1</bBuild>
                </Build>
                <Build>
                    <BuildType>BUILD_LIGHTHOUSE_GREAT_BARRIER</BuildType>
                    <bBuild>1</bBuild>
                </Build>
            </Builds>
        </UnitInfo>

And what is there would be fine if everything was in core.


Why would I be involved at all? Natural Wonders has been a core option for a very long time. If you are making changes to a module it is your responsibility to find out how to make the bits play together nicely.

Changes done to Natural Wonders.
Now New Cultures can be safely disabled.

Also I think it was one of rare commits, where I touched something interacting between two modules.
You can now run xml validator to check if everything else is done correctly as it should be.
 
I temporarily removed the code for getting militia units from farms, I forgot about it , so temporary has been a long time now.
I didn't like the feature as it was and figured I'd just remove it until I could think of a better militia feature for that civic, haven't thought of a better feature, so maybe it's time to add it back in. ^^
I think that's the only gameplay mechanic that I rudely removed in that manner.
if u dont want to add it NOW, can u inform me how to do it NOW, so "I" can add it, thx .. .this is one feature i added back in 2009,, thx. .then DH changed it better to conform to C2C . .
 
You only have one object in a module. One bonus or one building etc. No module has more than one object and all its relationships to other modules is well defined.
Are you suggesting there should be a few thousand modules?
 
if u dont want to add it NOW, can u inform me how to do it NOW, so "I" can add it, thx .. .this is one feature i added back in 2009,, thx. .then DH changed it better to conform to C2C . .
It's easier to just do it than to explain it, so I did it for you.
Install the attached modmodmod after PPIO is installed.
I haven't tested it, but I think it works.
 

Attachments

Last edited:
Are you suggesting there should be a few thousand modules?
Yes. Currently it is next to impossible to find the weird bug stuff with our XML because of all the comments in it. Having everything in modules or getting rid of those comments would take hours off finding those bugs.
Closer to several thousands ;)
Now I really think, that he doesn't know how to use notepad++ search effectively.
I use a professional XML tool. A hold over from before I retired. It does a lot more on the fly validation (but not schema based).
 
Yes. Currently it is next to impossible to find the weird bug stuff with our XML because of all the comments in it. Having everything in modules or getting rid of those comments would take hours off finding those bugs.

I use a professional XML tool. A hold over from before I retired. It does a lot more on the fly validation (but not schema based).
Well mod would load much longer because of all those files - its way faster to load one single file than a lot of files when they take same amount of space.

TBH modules could be eradicated completely (maybe except for Pepper's extraterrestrial stuff and those currently disabled), just keep major categories of buildings and units in separate files.

You can try PPIO
 
Yes. Currently it is next to impossible to find the weird bug stuff with our XML because of all the comments in it. Having everything in modules or getting rid of those comments would take hours off finding those bugs.

I use a professional XML tool.
Is this tool the reason that note lines are causing you problems? Maybe you need a better tool...

I'm sorry but I find this suggestion insane on the face of it. Do you have any idea how many added lines of XML would be necessary to build out all the dependencies this would require?
 
Is this tool the reason that note lines are causing you problems? Maybe you need a better tool...
No it is comments. The brute force way to find problems is to comment out half of the XML. If you still have the problem then it is in the half you didn't comment out. You can't do9 that with all the comments in. You have to delete half. This is a problem when you have narrowed down the problem to somewhere in the 17th 32nd of the file.
 
No it is comments. The brute force way to find problems is to comment out half of the XML. If you still have the problem then it is in the half you didn't comment out. You can't do9 that with all the comments in. You have to delete half. This is a problem when you have narrowed down the problem to somewhere in the 17th 32nd of the file.
How is it that you cannot still do that with the way things are now? Are you saying that if you start a comment out such as "<!--", anywhere where there is an endcomment such as --> will end that effort, even if there is another startcomment in there? If that's the case, that's interesting.

I wouldn't think that would work with a lot of Civ game objects anyhow would it? Aren't there too many dependencies and interactions between objects for that? AKA, by commenting out half of the units, for example, you're bound to create problems where those commented out units are called for elsewhere right?

You can always cut half the XML and paste it into a holding document until you want to later cut and paste it back into place. Arguably, this is even easier. Certainly would be about the same degree of difficulty.
 
Are you saying that if you start a comment out such as "<!--", anywhere where there is an endcomment such as --> will end that effort, even if there is another startcomment in there? If that's the case, that's interesting.
I think that's always the case, because the additional startcomment is commented out. Although it would be really nice if comments could stack, I don't think I have seen that anywhere, unless you have different tags you can use (and most languages don't give you options - in fact, Perl doesn't even give you a single option that isn't a hack).
 
how do i change the size to what a person would want, meaning ie: right now i have it set to 1152X862,, but as u can see in the pic the second line/btns are not above the the bottom there and i need it to just be there above it to look normal, so i am asking, thx . . see pic

It's easier to just do it than to explain it, so I did it for you.
Install the attached modmodmod after PPIO is installed.
I haven't tested it, but I think it works.

dang thats what i forgot about the init file, geez, its been a long time since i did that stuff, thx .. SO and yes it works just fine ..
 

Attachments

  • 1152X864.JPG
    1152X864.JPG
    412.6 KB · Views: 134
Last edited:
Back
Top Bottom