[MERGE] KROME Beta: K-Mod 1.31 and RoM 1.03 Extended

If jtanner28 doesn't mind I'm going to update this with the last k-mod version, as well as fix some of the remaining bugs.

@jtanner28:
8.) Added the terrain Hardship mod. (need some work on this one. The hover text for terrain plots doesn't show how much damage the terrain does. I set it to 15% I think. It can be changed in the XML.)
The AI is not able to understand these things. I would suggest you to let this to be optional and ask some help about it or learn how the AI works really well first. Then try to code it.
There are multiple mods which require this code: fuel mods, food mods, ... essentially you will have to teach the AI when sending an unit through dangerous plots has sense and when returning and repairing (or resupply fuel in other mods) is recommended.
Seriously, disable it or just enable it for humans. If that makes sense.

Maybe Karadoc could help you, there is obviously interest in that code but no one has been able to do it yet... I think it can be done and even I consider to do it in the future but I'm currently busy with DoaNE mod for COL and I have no time for more...

Also if you need some help with the SDK just let me know.
 
@Isabelxxx,

Thanks for picking up on this. I agree the Terrain hardship/damage Mod should be Optional. It was in AND and is in C2C.

@sattrapper,

If bananas are showing up outside of jungle tiles then there is a map placement problem. But other resources that allow the JC to be built in forests or grassland, etc., is a bug and needs corrected. This was not a problem afaicr in base RoM1.03ext.

JosEPh
 
I have already done it. In fact I simply left the Dll as it was in the K-mod since:
-Advanced diplomacy requires changes to work with newer versions of k-mod, not only a merge.
-Multiple production requires changes to work with newer versions of k-mod, not only a merge.
-Multiple research. I was lazy, give me a day.


I do fixed a bug with worldsize types, since most modders (not you, jtanner28, since you were merging what already had errors) doesn't understand that worldsize types have to be added in the XML, the DLL and the python mapscripts files... the funny thing is that you can select any size you want but the mod will load other without giving you an error!

Well, in 2 hours it's upload. The dinner calls me.
 
KROME 0.85b PATCH
  • Download the last version of KROME (0.85) and then this patch.
    [*]Install the original 0.85 version first and then copy the contents of the zip file into the "KROME" mod folder.
    [*]Overwrite all, in other words, just apply the patch.
    [*]This is only a patch, original mod required!!


Source code included.


Code:
0.85b

*Updated with K-mod 1.35

*Just plain Rome 1.03 with K-mod, no other mod-mods:
	*No Advanced Diplomacy 2 --> Require some changes to work with new version!
	*Multiple Research Modcomp --> Will be added later
	*Multiple Production Modcomp --> Will be added later
	*Hard ship mod disabled by default --> It can be enabled via "KROME GLOBALS"

*KROME GLOBALS: "Go to KROME\Assets\Python\CvEventManager.py" file, look for "KROME GLOBALS" and change the variables to enable/disable some features.
	*bHardship = False #Enable\Disable hardship features (false as default, adds too much lag)

*KROME Worldsize Types: Now the new worldsize types are REALLY WORKING (before this update, the game would start and load the map without giving errors but the map size selected was not being really used but the default one!). For that changes have been done to the DLL and all the map script files. If more maps are used, those map scripts NEED TO BE EDITED.
	*Giant
	*Gigantic
	*Look for #KROME Worlsize Types in Public map files and //KROME Worldsize Types in the source code.

*Map Scripts Updated: to consider the new worldsize types. (all BTS vanilla maps not listed here will work without more changes)
	Arboria.py
	Boreal.py
	Donut.py
	Earth2.py
	Global_Highlands.py
	Highlands.py
	Rainforest.py
	RandomScriptMap.py
	Team_Battleground.py
	Terra.py
 

Attachments

Thank you Isabelxxx and everyone who has contribued to this project. I like this mod: it provides all the things I like about mods: new techs, advanced options, without the slow loading times and poor ai.
 
nicely done isabel. you're good at this!:)
do you plan on updating the patch to correct any of the other more minor bugs?
 
Yes, of course. I forgot them!!

Essentially I would only add bugfixes to KROME since K-Mod is updated every day.

It's just impossible to develop a merge with a bunch of personal SDK changes if the other mod is constantly changing the DLL. That's why I would suggest jtanner28 to just wait a bit before trying to resurrect AND or add more things to the SDK of KROME since if the main core should be the AI is just impossible to maintain the mod's AI updated without a gigantic amount of work on every update.
 
from
Code:
<BonusTypeStruct>
    <BonusType>BONUS_BANANA</BonusType>
    <bBonusMakesValid>1</bBonusMakesValid>
to
Code:
<BonusTypeStruct>
    <BonusType>BONUS_BANANA</BonusType>
    <bBonusMakesValid>0</bBonusMakesValid>
That's true, the DLL code overrides the feature type requirement if bBonusMakesValid is set to 1, it should be the opposite... anyway, setting it to zero solves the problem.

(edit) fix no.2:
the mini icons for some new resources dont appear in the city screen. replace the GameFont_75.tga in KROME\Assets\Res\Fonts with this one.
The wrong file comes from K-Mod! So the problem was while merging, the standard and the _75 versions are in fact different files.
I wonder if adding the ROME file as you did would provoke other icons to not work... (I don't have time to test that)
I will merge both files, so we have all the icons in both versions. That way it will work in any case.

(edit 2)
i presume there was some good reason (gameplay/balance maybe) why jtanner disabled the industry improvement, but if anyone wants to reenable them (me anyway:)) just remove the commenting around the UNIT_WORKER <builds> in unitinfos xml.
eg: change
Code:
<!--
                                <Build>
                                    <BuildType>BUILD_1FACTORY</BuildType>
                    <bBuild>1</bBuild>
                </Build>
                <Build>
                    <BuildType>BUILD_2FACTORY</BuildType>
                    <bBuild>1</bBuild>
                </Build>
                <Build>
                    <BuildType>BUILD_3FACTORY</BuildType>
                    <bBuild>1</bBuild>
                </Build> -->
to

Code:
                                <Build>
                                  <BuildType>BUILD_1FACTORY</BuildType>
                    <bBuild>1</bBuild>
                </Build>
                <Build>
                    <BuildType>BUILD_2FACTORY</BuildType>
                    <bBuild>1</bBuild>
                </Build>
                <Build>
                    <BuildType>BUILD_3FACTORY</BuildType>
                    <bBuild>1</bBuild>
                </Build>
(removing the -->)
I will make it a gameoption , so you can enable/disable it in custom game without messing with the XML files.
 
@anyone,
Did jt get the techtree for religion changes put in? And if so has it broken up the Poly/Mono/Buddha cluster?

I just have not had time to test this, so if anyone has experienced this break up could you post your impressions?

Thank you to Isabelxxx for taking control of this project. RoM1.03 and 1.03 ext have been special Mod versions of RoM for me for many years.

JosEPh :)
 
@JosEPh II
Since JT will not continue working on this actively at least for a time, and it's well known your experience with ROM I would want to ask you some help to balance, add/delete or modify KROME to get what's the best of ROME versions.

Should I consider ROM 1.03 as the definitive base? Any feature you wanted to be there but required SDK changes?

@satrapper:

Here it is the merged version, it was a bit weird since I have to create alpha channels and resize the things without having the original resources but... well, the result is great, weird was the work required...

attachment.php


I did both files: GameFont_75 and GameFont. So now all the icons should be there.

If finally those K-Mod icons are not used yet, It will be used in future versions, since I plan to merge other parts from K-Mod.
 

Attachments

  • Untitled-1.jpg
    Untitled-1.jpg
    251.9 KB · Views: 218
  • Res.zip
    Res.zip
    204.7 KB · Views: 80
Ok, the next patch is ready!

I added the hardship features, the Map decay features and the factory improvements as game options in the DLL and python files so you can enable/disable in custom game.

Fixed the jungle camp bug, activated the industry improvements and fixed the gamefont problems.

I have taken a look at all the ROM python part and I have to say that it's seriously... well, how to say it, slow. If I ever have time to do something with it an completely revamp of the code should be done. There should not be all those Python callback used! Now I understand why Rom didn't used a DLL, all is in python. But that is just x100 slower!
I don't plan to add more and more to the mod so it becomes slower even using a custom DLL but I think porting some of the already existing code to the DLL would be great. Same ROM mechanics but faster.
 
Hi Isabel,

When I merge your patch and run a custom game, the game starts, but there are no menu options, nor any unit options.

So, I have a settler and a warrior, but cannot get them to do anything or select any game options.

Any ideas why?

EDIT: it appears to be because I was using the Toelstra map script.
 
Ok, the next patch is ready!

I added the hardship features, the Map decay features and the factory improvements as game options in the DLL and python files so you can enable/disable in custom game.

Fixed the jungle camp bug, activated the industry improvements and fixed the gamefont problems.

I have taken a look at all the ROM python part and I have to say that it's seriously... well, how to say it, slow. If I ever have time to do something with it an completely revamp of the code should be done. There should not be all those Python callback used! Now I understand why Rom didn't used a DLL, all is in python. But that is just x100 slower!
I don't plan to add more and more to the mod so it becomes slower even using a custom DLL but I think porting some of the already existing code to the DLL would be great. Same ROM mechanics but faster.

@Isabexxx,
This version was before Zappara added REV and before the Custom .dll and WoC system was introduced. I think this was before or at the beginning of the "pickle / cpickle" changes that helped reduce the call backs. Zappara was learning Python about this time as by version 2.0 REV was merged in and a custom Dll. So in short yes it could use some changes.

I had asked Afforess to added in Usable Mountains and Multiple Research and Production for 1.03ext but he told me they would require SDK changes and he just didn't have the time. I didn't understand back then the amount of work just adding those 3 Options into this version would entail. On the other hand adding vincentz Jungle Camp didn't take Aff very long to do. And when I thought about adding in vincentz Industry Mod Aff was moving on.

One of the changes I would like to see is the techtree pathing of the Religion giving techs changed. I have not had the chance with the 0.85 version to see if jtanner28 started on this or if it's finished and just needing some polish. After August 17th I'll have some free time to dig into this deeper and be able to give better feedback. Until then it will be rather spotty as my time is limited.

If you can port anything to a Dll to make this version faster please do so. I really do appreciate your interest and skills being applied to this old "girl friend" of mine. ;) :D

JosEPh

Edit is Patch C available yet? (post # 111)
 
hey joe,
i havnt played much krome lately so have no idea how the ai responds to the change, but jtanner certainly changed the tech tree for religions. looks decent I think??
attachment.php


@kiwi,
Totestra seems to cause me no probs anyway. could be on your end? did you try fresh krome/isabel patch?

@isabel,
i should have compared the tgas before just posting the rom103 one, theres clearly additional icons in kmod's tga compared to vanilla as well, not just rom, now that i look. cheers for not calling me an idiot! :D

speaking of python callbacks, building upgrades don't work as intended. an upgrade does not prevent the older building from being built currently. looking at cvgameutils it seems every building upgrade makes a callback to "cannotConstruct". i've checked it out in-game (with walls-high walls and arcology-shielding) and even turning "cannotConstruct" on in the callbackdefines doesn't correct the behaviour. so i assume that karadoc has turned off the callback in k-mod??

your expanatory posts are very helpful to a noob civ modder like me, thanks for detailing everything you do.
 

Attachments

  • reltechtree.jpg
    reltechtree.jpg
    67.4 KB · Views: 212
@satrapper.

I'm just getting to Monotheism with Judaism qued after it. I see that jt made the religion founding tech separate and a dead end. This makes the player and AI have to actively go after the religion instead of getting 3 windfalls because of the tech tree pathing. I finally got C2C to do something very similar with it's 26 religions.

Have either of you looked to see if "pickle" or "cpickle" is being used in the callbacks? All I know is that when zappara discovered how to use these 2 that the turn processing speed increased and the MAFs went down. Of course this was 5+ years ago or more. I had all the early versions of RoM even 0.8 but 2 yrs ago I lost a HD and could not get all the data saved. I lost all those early versions and the notes I had from zappara's posts. There was something in the files that you looked for and then replaced with either the "pickle" command or the "cpickle" command. But I don't remember which file(s) any more. Probably not even important now as that was ancient history and I know that the Modding has leaped well beyond those days.

@Isabelxxx,
Waiting patiently for that next "patch". ;)

JosEPh :)
 
nothing pickled in 1.03 it seems. kmod has 2 files. one uses cpickle, the other doesn't. i might mention it to karadoc.

if you get a chance can you post if the ai handle religion research ok?
 
I'm a bit astonished. Just saw how "building upgrades" are check in python files and that is just...
That would be easily done in the SDK or at least if you do that in python, I would add arrays, so adding new buildings is just copy/paste for any user.

A fast look at the SDK shows that the callbacks are working as it should be (I'm using an extremely similar system to handle callbacks in my own mod), so if you really set "USE_CANNOT_CONSTRUCT_CALLBACK" to 1 it should work. Try doing this:


Go to cvgameutils, to the callback function and add just after:


Code:
		# Rise of Mankind start
Code:
		#Show a message in game:
		CvUtil.RedirectError().write("Hey!")

That will show you in game if it works or not. Also try deleting the cache, etc.


I'm really considering start from scratch. That's said, revise slowly all the KROME versions, take what is needed, revise that the code really works as it should be, assure that merging ROME with K-Mod really works in all aspects, etc.
If JT will not continue with this, I need to really be aware what has been done here. So don't worry too much about problems, but report them and I will do what I can sooner or later.
There are 2 points to consider:
I probably will need help with some things, like testing, XML balance, etc. any help is appreciated.
I'm really unsure about heavily mod the SDK, since K-Mod is constantly changing and at some point we have to choose if we want last K-Mod version or just I do my own improvements...

Have either of you looked to see if "pickle" or "cpickle" is being used in the callbacks? All I know is that when zappara discovered how to use these 2 that the turn processing speed increased and the MAFs went down. Of course this was 5+ years ago or more. I had all the early versions of RoM even 0.8 but 2 yrs ago I lost a HD and could not get all the data saved. I lost all those early versions and the notes I had from zappara's posts. There was something in the files that you looked for and then replaced with either the "pickle" command or the "cpickle" command. But I don't remember which file(s) any more. Probably not even important now as that was ancient history and I know that the Modding has leaped well beyond those days.

pickle? I have seen that in 2 places, but they are not used at all in the game at this moment. They are used to store Script data to cities and things like that.
I would not worry about speed since K-MOD SDK is heavily optimized, but I will do what I can.
 
if you get a chance can you post if the ai handle religion research ok?

Yes, it does handle it just fine. The system is not perfect, though, as getting a few prophet generating wonders essentially sets you up to get all the religions. As long as I don't bulb them, different religions will appear. But the system does need tweaking.

@Isabel, I'm happy to help test!
 
Yes, it does handle it just fine. The system is not perfect, though, as getting a few prophet generating wonders essentially sets you up to get all the religions. As long as I don't bulb them, different religions will appear. But the system does need tweaking.
What about adding a modifier to prophet generation (or limits to generating wonders with them)?

I could do it in 2 ways:

1:Great Prophet generation threshold is multiplied by a factor X/100 according to some founding religion logic.
X goes from 0 to 100, and measures the number of religions recently found in game, as well as the time needed to assimilate a new religion.
X = 100 at the start (vanilla appearance)
When you found the 1st religion, X = 33. That's said, the opportunity to get a new great prophet is divided by 3 once you have found a new religion. It's logical, new religions being introduced in your culture would made great prophets less common.
When someone founds other religion (not you) (or after passing some turns, scalable with game speed), X=66.
When someone founds other religion (not you) (or after passing some turns, scalable with game speed), X= 100

After founding a third religion, the appearance threshold becomes stable. Then if you found other religion, the modifier becomes 33 again.

This basically will stop players to found more than 1 (or at max 2) religions in a short period of time, as well control the appearance of great prophets. New religions founded by our nation means less religious stability and therefore less great prophets; the pass of time and the appearance of other religions outside our cultural borders would bring more stability to great prophet appearance. (I don't discuss religious stability itself here)

2: Just limit the number of wonders you can generate with the great prophets according to some turn timer.


Option 1 simply sounds much better and shinier.

@Isabel, I'm happy to help test!
Great! I will consider uploading the code to a repository, so anyone can download it and test.


EDIT:
Other thing in which I would be interested in would be new units. I do think that diversity in units is great, specially give diversity for different nations, naval and air units. So if anyone thinks there are some interesting units which fits here (doesn't break balance or mod stability and is not just another unit without logic), go ahead and suggest them or help me with the XML part (it's really easy, and I could give some help if needed)
 
Back
Top Bottom