OSP Kit QoL Tournament Play Enhancements 1.5

Users who are viewing this thread

Hi.

I am getting a consistent crash when entering tournaments. I am using the Floris Mod Pack , but i have reduced the crash to the enabling of the TPE feature in the options menu. Without TPE the tournament launches fine, with it, the game crashes. I have tried setting everything in TPE to native as far as possible with no difference.

Is this a known problem? Where can i seek assistance?
 
I keep getting the following errors:

Error: Unable to find object:trp_tpe_options
ERROR: Illegal Identifier:trp_tpe_options
Error: Unable to find object:trp_tpe_array_sorted_troops
ERROR: Illegal Identifier:trp_tpe_array_sorted_troops
Error: Unable to find object:trp_tpe_presobj
ERROR: Illegal Identifier:trp_tpe_presobj
Error: Unable to find object:trp_tpe_presobj
ERROR: Illegal Identifier:trp_tpe_presobj

At the bottom of module_constants.py I have a modmerger piece of code that looks like this:

Code:
# modmerger_start version=201 type=1
try:
    from util_common import logger
    from modmerger_options import mods_active
    modcomp_name = "constants"
    for mod_name in mods_active:
        try:
            logger.info("Importing constants from mod \"%s\"..."%(mod_name))
            code = "from %s_constants import *" % mod_name
            exec code
        except ImportError:
            errstring = "Component \"%s\" not found for mod \"%s\"." % (modcomp_name, mod_name)
            logger.debug(errstring)
except:
    raise
# modmerger_end

I know the trp_tpe_xxxx objects are supposed to be put into ID_troops somehow, but for whatever reason this is just not happening :sad:

EDIT: adding the contents of troop definitions.txt to module_troops.py seemed to fix most of these (there are still a few minor ones left but I should be able to figure those out :smile: )
 
Glad to see you found the answer.  I was going to say that the troops have to be manually added to troops.py.  I would also recommend doing the same with the items and deleting tournament_items.py.  While it'll work with the separate modmerger items file, it can lead to save game issues if you add more items to the game.  This is because the tournament items keep trying to tack themselves onto the end right before the "item_end" item.

If you have any other questions on getting the kit to work please let me know and enjoy. :smile:
 
What do I do, if Slot 235 is allready used in module_constants.py?

In my case by Diplomacy:
Code:
dplmc_slot_village_reserved_by_recruiter = 235            # This prevents recruiters from going to villages targeted by other recruiters.
 
Change it to a different constant? That slot is probably stand-alone and won't even be used in cities, unless recruiters also visit towns or you try to hold tournaments inside villages.
 
So it doesn't matter which constant it is? I could change it in 999 or something?

Forget about it.



Is there any chance to combine this with Diplomacy?
Both seem to work with different Versions of modmerger.
 
Life_Erikson said:
So it doesn't matter which constant it is? I could change it in 999 or something?

Forget about it.

Is there any chance to combine this with Diplomacy?
Both seem to work with different Versions of modmerger.
Yes, you can assign it any constant number you want, however, you want to keep those numbers as low as possible.  If you use 999 then you're going to stretch the slots for all parties from whatever your current highest number is to 999 with a value of 0 being stored in the in-between areas.  I'm not sure off-hand how much of an impact on save game size and processing speed that would have, but any amount more than necessary is undesirable.

Somebody was correct that those two slots could probably work together just fine as they are used by different types of parties, but otherwise just pick an open slot number for it.

The best version of modmerger to use is the latest one with changes by Caba'drin.  I think a copy of it is included with TPE, but if not you can find it here.
 
Thank's!

But my problem is that I allready use the module System of Diplomacy, which has modmerger (just an older Version).
I simply am not able to merge those two together and I think it has two reasons:

1) Diplomacy uses an older version of modmerger

2) Diplomacy also uses the formations mod featured in Tournament Play Enhancements just another Version.
    (So basically I'm ****ed even if I delete one of them.)









Edit:

I tried it with keeping the original Diplomacy modmerger files (just adding the stuff i need in modmerger_options).

I get this:

(in tournament_presentations.py)


NameERROR: name 'slot_agent_hp_bar_overlay_id' is not defined
 
Hmm.  Thought that would have been commented out.  It was included in Floris as that also uses the Custom Commander mod.  You can correct that by going into tournament_presentations.py and commenting the following lines as shown.

Code:
#hp bar
(try_begin),
	(eq, MOD_CUSTOM_COMMANDER_INSTALLED, 1), # Dependency (Custom Commander)
	# (troop_slot_eq, TPE_OPTIONS, tpe_val_show_health, 1), # Default display option.
	# (try_for_agents, ":agent_no"),
		# (agent_set_slot, ":agent_no", slot_agent_hp_bar_overlay_id, 0),
		# (agent_set_slot, ":agent_no", slot_agent_hp_bar_bg_overlay_id, 0),
	# (try_end),
	# (call_script, "script_update_agent_hp_bar"),
(try_end),

That should cover the only call to that slot if you didn't get any other errors.
 
Thank you, that fixed the error.

However now I have a ****load of errors about objects and identifiers. "Floris" was also mentioned in between.

I would post the code, but it was too long for the module System to list it completly. (the first two thirds are missing)


I need to have a general problem here.
Is it possible to merge this mod with diplomacy?
 
Life_Erikson said:
I need to have a general problem here.
Is it possible to merge this mod with diplomacy?
Without a list of compile errors (or at least the one that triggered the likely spam you received) it is hard to point you in a better direction, but you may want to look at Floris as it is open source and contains both mods.

The TPE mod itself should have no conflict or interaction with the diplomacy mod.  You may need to check if modmerger itself installed correctly at the bottom of the module_meshes, module_scenes, etc.. files.  I have generally found that several of those files do not get the proper modmerger code block at the bottom and have to have them manually added.  There is mention of this in the TPE readme that describes what you should look for.
 
But that means, that I should look for all scripts also used by your mod.



Not only module_meshes and module_strings.
(This is what I did and I still got these Errors.)




Edit: Did all of the above: still get the Errors

At every End of a module_xxxxx.py file that is used by the mod
I added:

Code:
# modmerger_start version=201 type=2
try:
    component_name = "xxxxx"
    var_set = { "xxxxx" : xxxxx }
    from modmerger import modmerge
    modmerge(var_set)
except:
    raise
# modmerger_end


However I still get a bunch of errors like these:

Unable to find object:
Illegal Identifier:

These ones are often beginning with trp.

mr7oko4dn2q4.png
 
There should be a text file called tournament_troops.txt or something similar.  Those entries need to be copied into your module_troops.py file.  I didn't set them up for working with modmerger to prevent messing with save games as other modders updated their work.  I'd also recommend moving all of the tournament_items.py entries over to your module_items.py file and then getting rid of tournament_items.py.

Every script used by TPE should be included within its own files even in Floris.  That is not true ever since this version was last released which is why I stopped updating it with copies from my own project (Floris Workshop and then Silverstag).
 
Thank you!

Now everything works as it should.
I do see now that most of my mistakes could have been prevented by reading the readme more carefully.  :oops:

However to my excuse I was a bit puzzled because Diplomacy already uses modmerger and a different version too.
 
Life_Erikson said:
Thank you!

Now everything works as it should.
I do see now that most of my mistakes could have been prevented by reading the readme more carefully.  :oops:

However to my excuse I was a bit puzzled because Diplomacy already uses modmerger and a different version too.
Good to hear things are working properly now.  That readme also explains some of the settings you can tweak in the tournament_constants file to make it better fit your mod.
 
Back
Top Bottom