• 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.

Pie AE K-MOD merge Project

HEY,
@Flunky ,
i merged in your PR.
im merging your changes manually to my end,
i wanna check all the changes.

some notes:
*please make sure to tag all your changes with #PAE start @PAE end.
im doing it now for your changes.
*are you sure all the merges you did are needed some seems like overwrite kmod changes.
i could be wrong.
*there are many indentation changes.
*sevopedia exists in kmod - why did you re add it?
it needs to be enabled in bug menu default.

ill add here later my questions per file.


EDIT:
ok, i think i understand most of the indentation and changes.
i compared to pre kmod pie.

anyway - @pie_at -> you should edit these values for the leaders.
its very important for the AI game play.
see kmod settings.
its lots of work...i know.

<!-- BBAI Victory Strategy -->
<iCultureVictoryWeight>0</iCultureVictoryWeight>
<iSpaceVictoryWeight>0</iSpaceVictoryWeight>
<iConquestVictoryWeight>0</iConquestVictoryWeight>
<iDominationVictoryWeight>0</iDominationVictoryWeight>
<iDiplomacyVictoryWeight>0</iDiplomacyVictoryWeight>
<!-- BBAI Victory Strategy -->

note error on bug option + after click ok the options doesnt work.
also scoreboard looks like it has issues.

upload_2021-5-22_22-51-6.png
 
Last edited:
I checked threeway, with PAE from one and kmod from the other side. Pie did extensive Pedia changes himself, that version should at least remain an option.

The indentation should be standardized to 4 spaces now. In Pie's code, that was all over the place, between 1 and 6 spaces. I found that really hard to read and prone to errors.

Some changes from Pie conflict with kmod, especially raw numbers. I tried to keep both versions, one commented out with "kmod was" or "PAE was" as marker.

The error looks like the last argument is None for some reason instead of a player number. It didn't appear for me, which menu did you open for it?
 
hey,

Pie did extensive Pedia changes
yes i saw, better use kmod core and port over Pie overwriting the least amount of code.

I found that really hard to read and prone to errors.
yes, it was bad, gotta stick to kmod.

one commented out with "kmod was" or "PAE was" as marker.
excellent, what is a must use Pie thats fine, whats important is to leave the reference for future compare to kmod if needed changes.

which menu did you open for it?
this is the bug option menu - ctrl+atl+o or simple - through the menu options (where you safe / load etc)- bug something ...

i fixed a syntax error you had that caused traceback.

will continue investigate bug error later this week .

but things are looking good.

@pie_at - need you assistance to push it forward :)
or anyone who wishes to help (even xml work).
 
Interesting, bug options menu as such worked for me, but I didn't check all submenus.
 
According to your last commit, the only change was adding the CvScreensInterface.py.bak file. I guess that was created automatically by Winmerge. The only difference to my version of CvScreensInterface.py is a new syntax error in line 70 :D
 
Of course I will help in making the XML files and I will merge the pedia python things then into sevopedia.

So, about the leader XML:
for working with the k-mod you could delete all CIVs except one or two (and barbarians) and only use one leader for them (delete the rest).
In the meanwhile I will add the XML changes.

between which lines I have to add this in leaderXML?:
<!-- BBAI Victory Strategy -->
<iCultureVictoryWeight>0</iCultureVictoryWeight>
<iSpaceVictoryWeight>0</iSpaceVictoryWeight>
<iConquestVictoryWeight>0</iConquestVictoryWeight>
<iDominationVictoryWeight>0</iDominationVictoryWeight>
<iDiplomacyVictoryWeight>0</iDiplomacyVictoryWeight>
<!-- BBAI Victory Strategy -->
 
The lines are already added in the version on git, you have to provide valid numbers for each leader. The CIV4LeaderHeadInfos.xml is appended.
 

Attachments

Hey flunky,
Yes you ne liner.
I gotta take the bak out in the gitcore.

Hey Pie,
Yes, the lines are added kindly by flunky,
You need to define how do you want each leader to act in regards to victory conditions.
You can see existing numbers in vanilla kmod or even advciv or realism invictus or history rewritten.
 
The Bug options error was due to a setting stored in My Games\Beyond the Sword\K-Mod\Settings. It appeared on my side when I tried to modify the NJAGC color dropdowns to reflect the eras of PAE.
After changing CvModName.py from kmod to PAE and thereby creating a blank new settings folder, the error is gone.
 
by the way guys,
im working on my side project that merged kmod (advc branch) all the mod parts (optional) to the kmod code.
its not my doto mod based on advc code, but kmoid based.
its will be used with my modding platform as well that i release some time ago.

what im saying is, that after this kmod pie merge will be done.
if needed i will be able to port any mod component from my setup to this one.
it can open new stuff for Pie AE.

:)
 
I don't quite get what you are merging where: advc, doto, kmoid? I guess the last one is just a typo for kmod, but the other two?
 
Hehe,
Ok so,
I got Doto, based on advc plus mod parts i made and merged.
Also, i got unpublished mod, same as doto,, but based on kmod without advc.
Sime months ago i released a stripped mod, no xml content, just skeleton with kmod and my parts.

So main thing im sayings is that ill be able to enrich Pie kmod later on according to Pie requests.
 
I guess after the two open pull requests, we still have a bunch of bugs to find and fix.

The core of StartingPoints is shifted to the WBSave loading, which eliminated the need to kill units and manage visible plots.
@pie_at: is the barb city placement from StartingPoints actually used? I guess that could also happen in WBSave loading.

What should be the next steps?
For the flight mechanic I already did some coding back in 2016, maybe that could be updated to the current rules and merged with kmod SDK.
@pie_at: how should Flight work ideally?
I'd suggest:
- Only defender, since attackers can use retreat mechanic
- Last fighting unit leaves the plot when fleeing, otherwise it stays. Regardless if city or not.
- Flight always takes place right before the fatal blow, leaving the unit with little health. Optional: if the fight is very one sided (i.e. defender needs more than twice as many hits to victory than attacker) Flight might trigger earlier.
- Units cannot flee from surrounded plots except if they flee to their own plot.
- optional: fleeing units loose "morale", e.g. loose promotions or get war weariness.

Keeping the current health means that Flight promotions can only influence the chances. With the last suggestion implemented, they could also limit the morale loss.
 
Last edited:
Sure, I'm talking about porting to dll. Sometimes I write SDK since that's what the source code folder is called in BtS.

When you have a look in our old project https://github.com/dead-flunky/PAE there are already some PAE features ported. Mostly in a very raw state, but we can use it as a basis.

And there are also features which I think never made it into PAE, for example unit religion: Since each unit represents a bunch of people, why not assign them a religion based on the city where they were recruited. If two units meet on the battlefield who share the same religion, it might happen that they refuse to fight each other, or if only one side has the same state religion, they might even defect.
 
is the barb city placement from StartingPoints actually used? I guess that could also happen in WBSave loading.

Yes, I think so.

Flight:
- Only defender, since attackers can use retreat mechanic -> but not every attacker has this promo. so I prefer for the attackers too. (promos should be prior)
- Last fighting unit leaves the plot when fleeing, otherwise it stays. Regardless if city or not. -> agreed
- Flight always takes place right before the fatal blow, leaving the unit with little health. Optional: if the fight is very one sided (i.e. defender needs more than twice as many hits to victory than attacker) Flight might trigger earlier. -> agreed
- Units cannot flee from surrounded plots except if they flee to their own plot. -> agreed
- optional: fleeing units loose "morale", e.g. loose promotions or get war weariness -> agreed
 
Pie provided me with an initial dll wishlist:
-) new Mission: drive out religion
Missionaries can remove religions from a city. Up to now, that's a special unit in PAE, that should be merged with the normal missionary.
kmod implements some chance, that failing missionaries can remove another religion from the city. That should be disabled.

-) Ramks Rivers
That should be implemented by Ramk
biggrin1_s.gif


-) Generals should only defend, if they are the most healthy (not only strongest) unit in the stack (lead from behind, if you will)

-) Population numbers. Such that Pop 5 doesn't mean 500'000 people in a city. Pop 1 around 500 people, Pop 6 around 50.000. Pop 25 close to 1 M.
Previously: Pop^2.8 *1000.
Suggestion: round(Pop^2.8) * 100 + 400 yields Pop1: 500, Pop6: 15500, Pop25: 821200.
Alternative: round(Pop^2.09)* 1200 - 700 yields Pop1:500, Pop6: 49700, Pop25: 1001300.

For the first version I'll put up a PR. I like the slower start with 500, 1100, 2600, 5300, 9500, 15500 vs. 500, 4100, 11300, 20900, 34100, 49700.

-) Forts in enemy territory: defensive bonus for whomever is occupying it. Currently, PAE modifies the plot culture to change the ownership accordingly.

-) Forts and lookout towers with +1 vision range for units on them. Currently, a promotion is given dynamically onUnitMove.

-) Ice on water: should be accessible to land units and not for ships (except for submarines, which PAE does not have).
Something like a "FeatureMakesValid" tag for movement?

-) Terrain: Desert, swamp and tundra should cause damage. Low priority feature. Already implemented in the old project and could be merged.

-) UnitClassType: Chariot: should not be able to move through the woods (forest, dense, jungle; but savanna is ok). Any road enables movement. Optionally the same for heavy siege weapons.
How could the AI cope with such a rule? Path finding is so far no part of their production planning, I guess.

-) Unit religion: each unit is assigned (statically) a religion based on the city where they were recruited. If two units meet on the battlefield who share the same religion, it might happen that they refuse to fight each other, or one side might defect.
As written before, that's also at least partly implemented in the old project
 
Back
Top Bottom