Problems with merging Freelancer 1.51

Users who are viewing this thread

I'm trying to merge Freelancer 1.51 into my mod using ModMerger(currently I'm using Floris 2.55's Freelancer .py files and Caba'drin's ModMerger Additions to see if they would fix the issue, they didn't). I can join armies and I believe most anything else but I get errors in the console and there is an error in game about a missing mesh.
(get_object: failed for: pic_soldier_world_map) Here is the module system's log:

C:\Users\NoChar\Desktop\Modsys\Module_system 1.171\util_scripts.py:84: UserWarning: Error injecting code into: party_give_xp_and_gold
  warnings.warn("Error injecting code into: %s" % (cur_directive[1]) )
Initializing...
C:\Users\NoChar\Desktop\Modsys\Module_system 1.171\util_scripts.py:84: UserWarning: Error injecting code into: party_give_xp_and_gold
  warnings.warn("Error injecting code into: %s" % (cur_directive[1]) )
Compiling all global variables...
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
C:\Users\NoChar\Desktop\Modsys\Module_system 1.171\util_scripts.py:84: UserWarning: Error injecting code into: party_give_xp_and_gold
  warnings.warn("Error injecting code into: %s" % (cur_directive[1]) )
Exporting map icons...
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Exporting faction data...
Exporting item data...
C:\Users\NoChar\Desktop\Modsys\Module_system 1.171\util_scripts.py:84: UserWarning: Error injecting code into: party_give_xp_and_gold
  warnings.warn("Error injecting code into: %s" % (cur_directive[1]) )
Exporting scene data...
C:\Users\NoChar\Desktop\Modsys\Module_system 1.171\util_scripts.py:84: UserWarning: Error injecting code into: party_give_xp_and_gold
  warnings.warn("Error injecting code into: %s" % (cur_directive[1]) )
Exporting troops data
Exporting particle data...
C:\Users\NoChar\Desktop\Modsys\Module_system 1.171\util_scripts.py:84: UserWarning: Error injecting code into: party_give_xp_and_gold
  warnings.warn("Error injecting code into: %s" % (cur_directive[1]) )
Exporting scene props...
C:\Users\NoChar\Desktop\Modsys\Module_system 1.171\util_scripts.py:84: UserWarning: Error injecting code into: party_give_xp_and_gold
  warnings.warn("Error injecting code into: %s" % (cur_directive[1]) )
Exporting tableau materials data...
C:\Users\NoChar\Desktop\Modsys\Module_system 1.171\util_scripts.py:84: UserWarning: Error injecting code into: party_give_xp_and_gold
  warnings.warn("Error injecting code into: %s" % (cur_directive[1]) )
Exporting presentations...
Exporting party_template data...
C:\Users\NoChar\Desktop\Modsys\Module_system 1.171\util_scripts.py:84: UserWarning: Error injecting code into: party_give_xp_and_gold
  warnings.warn("Error injecting code into: %s" % (cur_directive[1]) )
Exporting parties
Exporting quest data...
Exporting info_page data...
C:\Users\NoChar\Desktop\Modsys\Module_system 1.171\util_scripts.py:84: UserWarning: Error injecting code into: party_give_xp_and_gold
  warnings.warn("Error injecting code into: %s" % (cur_directive[1]) )
Exporting scripts...
Error: Unable to find object:script_troop_can_use_item
ERROR: Illegal Identifier:script_troop_can_use_item
Error: Unable to find object:script_troop_can_use_item
ERROR: Illegal Identifier:script_troop_can_use_item
Error: Unable to find object:script_troop_can_use_item
ERROR: Illegal Identifier:script_troop_can_use_item
Error: Unable to find object:script_troop_can_use_item
ERROR: Illegal Identifier:script_troop_can_use_item
Error: Unable to find object:script_troop_can_use_item
ERROR: Illegal Identifier:script_troop_can_use_item
Error: Unable to find object:script_troop_can_use_item
ERROR: Illegal Identifier:script_troop_can_use_item
C:\Users\NoChar\Desktop\Modsys\Module_system 1.171\util_scripts.py:84: UserWarning: Error injecting code into: party_give_xp_and_gold
  warnings.warn("Error injecting code into: %s" % (cur_directive[1]) )
Exporting mission_template data...
C:\Users\NoChar\Desktop\Modsys\Module_system 1.171\util_scripts.py:84: UserWarning: Error injecting code into: party_give_xp_and_gold
  warnings.warn("Error injecting code into: %s" % (cur_directive[1]) )
Exporting game menus data...
C:\Users\NoChar\Desktop\Modsys\Module_system 1.171\util_scripts.py:84: UserWarning: Error injecting code into: party_give_xp_and_gold
  warnings.warn("Error injecting code into: %s" % (cur_directive[1]) )
exporting simple triggers...
Error: Unable to find object:itm_trade_bread
ERROR: Illegal Identifier:itm_trade_bread
C:\Users\NoChar\Desktop\Modsys\Module_system 1.171\util_scripts.py:84: UserWarning: Error injecting code into: party_give_xp_and_gold
  warnings.warn("Error injecting code into: %s" % (cur_directive[1]) )
exporting triggers...
exporting dialogs...
C:\Users\NoChar\Desktop\Modsys\Module_system 1.171\util_scripts.py:84: UserWarning: Error injecting code into: party_give_xp_and_gold
  warnings.warn("Error injecting code into: %s" % (cur_directive[1]) )
Checking global variable usages...
Imported 20 global variables for saved-game compatability that are not used.
Exporting postfx_params...

______________________________

Script processing has ended.
Press any key to exit. . .
Any suggestions?
 
Check the freelancer files, there are comments of type 'FLORIS ONLY/Floris or no Diplomacy'. As for the missing mesh, well, missing mesh... add the mesh to your mod.
 
Dj_FRedy said:
Check the freelancer files, there are comments of type 'FLORIS ONLY/Floris or no Diplomacy'. As for the missing mesh, well, missing mesh... add the mesh to your mod.

Thank you! No more errors about anything in the Module system. The only error is the missing mesh which looks really ugly.
TeYZR7t.jpg

Do you know would I find the missing mesh and add it back in?
 
Dj_FRedy said:
The first link leads to the source.
https://forums.taleworlds.com/index.php/topic,174845.msg4199986.html#msg4199986
The 1.51 freelancer freelancer_meshes.py from that link has exact same text as the one in my module system.
They both list the missing meshes, but the meshes just don't appear in-game.

freelancer_meshes.py:

# Freelancer (1.3) by Taragoth
# Released 11 July 2011
# Edits by Caba'drin 14 Dec 2011
# Mod-Merger'd by Windyplains, Monnikje and Caba'drin

from header_meshes import *

####################################################################################################################
#  Each mesh record contains the following fields:
#  1) Mesh id: used for referencing meshes in other files. The prefix mesh_ is automatically added before each mesh id.
#  2) Mesh flags. See header_meshes.py for a list of available flags
#  3) Mesh resource name: Resource name of the mesh
#  4) Mesh translation on x axis: Will be done automatically when the mesh is loaded
#  5) Mesh translation on y axis: Will be done automatically when the mesh is loaded
#  6) Mesh translation on z axis: Will be done automatically when the mesh is loaded
#  7) Mesh rotation angle over x axis: Will be done automatically when the mesh is loaded
:cool: Mesh rotation angle over y axis: Will be done automatically when the mesh is loaded
#  9) Mesh rotation angle over z axis: Will be done automatically when the mesh is loaded
#  10) Mesh x scale: Will be done automatically when the mesh is loaded
#  11) Mesh y scale: Will be done automatically when the mesh is loaded
#  12) Mesh z scale: Will be done automatically when the mesh is loaded
####################################################################################################################

meshes = [
#+freelancer begin
  ("pic_soldier_world_map", 0, "pic_soldier_world_map", 0, 0, 0, 0, 0, 0, 1, 1, 1),
  ("pic_soldier_rebel", 0, "pic_soldier_rebel", 0, 0, 0, 0, 0, 0, 1, 1, 1),
  ("pic_soldier_desert", 0, "pic_soldier_desert", 0, 0, 0, 0, 0, 0, 1, 1, 1),
#+freelancer end
]


from util_common import *

def modmerge_meshes(orig_meshes):
    # add remaining meshes
    from util_common import add_objects
    num_appended, num_replaced, num_ignored = add_objects(orig_meshes, meshes)
    print num_appended, num_replaced, num_ignored


# Used by modmerger framework version >= 200 to merge stuff
# This function will be looked for and called by modmerger if this mod is active
# Do not rename the function, though you can insert your own merging calls where indicated
def modmerge(var_set):
    try:
        var_name_1 = "meshes"
        orig_meshes = var_set[var_name_1]
        modmerge_meshes(orig_meshes)
    except KeyError:
        errstring = "Variable set does not contain expected variable: \"%s\"." % var_name_1
        raise ValueError(errstring)
 
That's because you must add the 'mesh' to your mod in addition to the code.
Download: https://www.mbrepository.com/file.php?id=3459
Resource/pics_freelancer.brf

Add textures to your mod.
Copy 'pics_freelancer.brf' to the 'Resource' folder of your mod.
Add to module.ini of your mod for example before #animations:
Code:
load_mod_resource = pics_freelancer
 
Dj_FRedy said:
That's because you must add the 'mesh' to your mod in addition to the code.
Download: https://www.mbrepository.com/file.php?id=3459
Resource/pics_freelancer.brf

Add textures to your mod.
Copy 'pics_freelancer.brf' to the 'Resource' folder of your mod.
Add to module.ini of your mod for example before #animations:
Code:
load_mod_resource = pics_freelancer
Sorry for being such a noob at modding (you have better things you could be doing other than helping me), but I'm now getting an RGL error: "Couldn't load 'Textures/pic_soldier_world_map.dds'" and the same error pops up for the other meshes too when I try and open their respective windows.

Also, my module system works but every few lines of exporting meshes/scripts/whatever there are just the numbers "3 0 0" as their own line:
3 0 0
Initializing...
3 0 0
Compiling all global variables...
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
3 0 0
Exporting meshes...
Exporting sounds...
Exporting skins...
3 0 0
Exporting map icons...
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Exporting faction data...
Exporting item data...
3 0 0
Exporting scene data...
3 0 0
Exporting troops data
Exporting particle data...
3 0 0
Exporting scene props...
3 0 0
Exporting tableau materials data...
3 0 0
Exporting presentations...
Exporting party_template data...
3 0 0
Exporting parties
Exporting quest data...
Exporting info_page data...
3 0 0
Exporting scripts...
3 0 0
Exporting mission_template data...
3 0 0
Exporting game menus data...
3 0 0
exporting simple triggers...
3 0 0
exporting triggers...
exporting dialogs...
3 0 0
Checking global variable usages...
Imported 20 global variables for saved-game compatability that are not used.
Exporting postfx_params...

______________________________

Script processing has ended.
Press any key to exit. . .
Thanks for your help so far, and hopefully this is the last issue with merging the Freelancer mod for me.
 
Try to use spoilers for the logs, the messages are more beautiful and readable for the display of the message and do not worry, we have all started at some point.
Copy the textures from the download to the 'Textures' folder of your mod.
 
Dj_FRedy said:
Try to use spoilers for the logs, the messages are more beautiful and readable for the display of the message and do not worry, we have all started at some point.
Copy the textures from the download to the 'Textures' folder of your mod.
Thank you! This seems so easy after doing it once. Also the "3 0 0" in the modsys log isn't causing any issues other than it's an eye sore in the code as far as I can tell. Again, thank you. Without people like you with quick and helpful responses I wouldn't be able to do this. :grin:
 
Back
Top Bottom