Global Mod with Edits to UI files

Post Reply
Schweetness101
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 928
Joined: Tue Nov 29, 2016 6:12 am

Global Mod with Edits to UI files

Post by Schweetness101 »

I am trying to make an existing mod I have a global mod, but I am running into some issues. Is there any reason why a mod which works in the CAMPAIGNS and MULTIPLAYER folders would not work as a global mod in the MODS folder?

When I try to use the otherwise working mod in the MODS folder, it shows up fine in the global mods menu, and can be loaded, but if you try to start a game with it it gives an error in the DATA/UI/UNITINFOPOPUP.BSF file indicating that it is keeping the native version for that file, and not overwriting it with the mod version. The earlier version of the mod without that file worked as a global mod fine.

In the mod, that file is located in MainModFolder/DATA/UI/UNITINFOPOPUP.BSF, and works normally when the mod is in the CAMPAIGNS and MULTIPLAYER folders, but is not picked up when used as a global mod. Do global mods not accept UI folder edits, or perhaps do I need to put that file somewhere else for it to work as a global mod? I do already have UNITINFOPOPUP.txt in the same UI folder of the mod as well.

the only edit in that UNITINFOPOPUP.bsf file is just adding one parameter to the GetImpactPoa() method, if that helps.

thanks
My Mods:
Ancient Greek https://www.slitherine.com/forum/viewtopic.php?p=977908#p977908
Dark Ages Britain https://www.slitherine.com/forum/viewtopic.php?t=106417
Anarchy (Medieval) https://www.slitherine.com/forum/viewtopic.php?p=987488#p987488
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28320
Joined: Sun Dec 04, 2005 6:25 pm

Re: Global Mod with Edits to UI files

Post by rbodleyscott »

Nobody will know the answer to this except Pip. I believe you have sent him a PM.

I can tell you that it won't load mods for /Core/UI files, but I thought it would for /Data/UI files - but I may have been wrong.
Richard Bodley Scott

Image
Schweetness101
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 928
Joined: Tue Nov 29, 2016 6:12 am

Re: Global Mod with Edits to UI files

Post by Schweetness101 »

rbodleyscott wrote: Fri Jun 12, 2020 7:23 am Nobody will know the answer to this except Pip. I believe you have sent him a PM.
yes I did pm him, he just asked me to post the question in here as well, I guess to post his answer after he gets back to me
My Mods:
Ancient Greek https://www.slitherine.com/forum/viewtopic.php?p=977908#p977908
Dark Ages Britain https://www.slitherine.com/forum/viewtopic.php?t=106417
Anarchy (Medieval) https://www.slitherine.com/forum/viewtopic.php?p=987488#p987488
Schweetness101
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 928
Joined: Tue Nov 29, 2016 6:12 am

Re: Global Mod with Edits to UI files

Post by Schweetness101 »

rbodleyscott wrote: Fri Jun 12, 2020 7:23 am Nobody will know the answer to this except Pip. I believe you have sent him a PM.

I can tell you that it won't load mods for /Core/UI files, but I thought it would for /Data/UI files - but I may have been wrong.
does it also not accept text files in the main mod folder? text1 in the the main mod folder appears to not be loading when used as a global mod (I got it to otherwise work by removing the ui file changes in a test version of the alt mod as a global mod). It picks up text1 for the mod's title, but nothing else in there is accepted.
My Mods:
Ancient Greek https://www.slitherine.com/forum/viewtopic.php?p=977908#p977908
Dark Ages Britain https://www.slitherine.com/forum/viewtopic.php?t=106417
Anarchy (Medieval) https://www.slitherine.com/forum/viewtopic.php?p=987488#p987488
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28320
Joined: Sun Dec 04, 2005 6:25 pm

Re: Global Mod with Edits to UI files

Post by rbodleyscott »

Schweetness101 wrote: Mon Jun 15, 2020 3:17 am
rbodleyscott wrote: Fri Jun 12, 2020 7:23 am Nobody will know the answer to this except Pip. I believe you have sent him a PM.

I can tell you that it won't load mods for /Core/UI files, but I thought it would for /Data/UI files - but I may have been wrong.
does it also not accept text files in the main mod folder? text1 in the the main mod folder appears to not be loading when used as a global mod (I got it to otherwise work by removing the ui file changes in a test version of the alt mod as a global mod). It picks up text1 for the mod's title, but nothing else in there is accepted.
I was not aware that it didn't work. One for Pip again please. And let me know what he replies.

As you may have guessed by now, the global mod system is something of a Work in Progress which was added on relatively recently. The main, fully developed, Mod system is the modded "Campaign" folder system.
Richard Bodley Scott

Image
Paul59
General - King Tiger
General - King Tiger
Posts: 3859
Joined: Tue Jul 21, 2015 11:26 pm

Re: Global Mod with Edits to UI files

Post by Paul59 »

Schweetness101 wrote: Mon Jun 15, 2020 3:17 am
rbodleyscott wrote: Fri Jun 12, 2020 7:23 am Nobody will know the answer to this except Pip. I believe you have sent him a PM.

I can tell you that it won't load mods for /Core/UI files, but I thought it would for /Data/UI files - but I may have been wrong.
does it also not accept text files in the main mod folder? text1 in the the main mod folder appears to not be loading when used as a global mod (I got it to otherwise work by removing the ui file changes in a test version of the alt mod as a global mod). It picks up text1 for the mod's title, but nothing else in there is accepted.
I found a way to get the text files working for the Global TT Mod.

The text files need to be within a Text subfolder in the Global Mods Data folder, just like the main game files!

Image

Image


cheers

Paul
Field of Glory II Scenario Designer - Age of Belisarius, Rise of Persia, Wolves at the Gate and Swifter than Eagles.

Field of Glory II Medieval Scenario Designer.

FOGII TT Mod Creator

Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
pipfromslitherine
Site Admin
Site Admin
Posts: 9882
Joined: Wed Mar 23, 2005 10:35 pm

Re: Global Mod with Edits to UI files

Post by pipfromslitherine »

IIRC the documentation does apologise for the differences in folder layout between global mods and campaigns. :)

Cheers

Pip
follow me on Twitter here
Schweetness101
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 928
Joined: Tue Nov 29, 2016 6:12 am

Re: Global Mod with Edits to UI files

Post by Schweetness101 »

Paul59 wrote: Mon Jun 15, 2020 11:31 am
I found a way to get the text files working for the Global TT Mod.

The text files need to be within a Text subfolder in the Global Mods Data folder, just like the main game files!

...
thanks! that seems to work for the text files.

The UI.bsf file I've edited for the mod is in Data/Battle/Scripts, and so its edits take fine in MODS, it's just the UnitInfoPopup.bsf file in the UI folder that is not accepted. The only loss there is that the popup values do not reflect the unit ui in the global mod, and that I cannot add a parameter to getimpactpoa() for the global version of the mod because it is called in UnitInfoPopup.bsf, which in my case also means I cannot add the extra anarchy charge buff to anarchy charge impacts, but otherwise I can make the whole thing global. That's not a huge loss.

I guess I could just experiment with putting those UI files or the whole UI folder in different places in the file hierarchy to see if it takes.
My Mods:
Ancient Greek https://www.slitherine.com/forum/viewtopic.php?p=977908#p977908
Dark Ages Britain https://www.slitherine.com/forum/viewtopic.php?t=106417
Anarchy (Medieval) https://www.slitherine.com/forum/viewtopic.php?p=987488#p987488
Schweetness101
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 928
Joined: Tue Nov 29, 2016 6:12 am

Re: Global Mod with Edits to UI files

Post by Schweetness101 »

pipfromslitherine wrote: Mon Jun 15, 2020 3:03 pm IIRC the documentation does apologise for the differences in folder layout between global mods and campaigns. :)

Cheers

Pip
haha no problem, and can global mods take edits to files in the UI folder?
My Mods:
Ancient Greek https://www.slitherine.com/forum/viewtopic.php?p=977908#p977908
Dark Ages Britain https://www.slitherine.com/forum/viewtopic.php?t=106417
Anarchy (Medieval) https://www.slitherine.com/forum/viewtopic.php?p=987488#p987488
desicat
Administrative Corporal - SdKfz 251/1
Administrative Corporal - SdKfz  251/1
Posts: 141
Joined: Sun Feb 09, 2020 3:02 pm

Re: Global Mod with Edits to UI files

Post by desicat »

Schweetness101 wrote: Mon Jun 15, 2020 3:31 pm
Paul59 wrote: Mon Jun 15, 2020 11:31 am
I found a way to get the text files working for the Global TT Mod.

The text files need to be within a Text subfolder in the Global Mods Data folder, just like the main game files!

...
thanks! that seems to work for the text files.

The UI.bsf file I've edited for the mod is in Data/Battle/Scripts, and so its edits take fine in MODS, it's just the UnitInfoPopup.bsf file in the UI folder that is not accepted. The only loss there is that the popup values do not reflect the unit ui in the global mod, and that I cannot add a parameter to getimpactpoa() for the global version of the mod because it is called in UnitInfoPopup.bsf, which in my case also means I cannot add the extra anarchy charge buff to anarchy charge impacts, but otherwise I can make the whole thing global. That's not a huge loss.

I guess I could just experiment with putting those UI files or the whole UI folder in different places in the file hierarchy to see if it takes.
Too bad, that extra buff was my favorite part.
Schweetness101
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 928
Joined: Tue Nov 29, 2016 6:12 am

Re: Global Mod with Edits to UI files

Post by Schweetness101 »

desicat wrote: Mon Jun 15, 2020 4:41 pm
Schweetness101 wrote: Mon Jun 15, 2020 3:31 pm
Paul59 wrote: Mon Jun 15, 2020 11:31 am
I found a way to get the text files working for the Global TT Mod.

The text files need to be within a Text subfolder in the Global Mods Data folder, just like the main game files!

...
thanks! that seems to work for the text files.

The UI.bsf file I've edited for the mod is in Data/Battle/Scripts, and so its edits take fine in MODS, it's just the UnitInfoPopup.bsf file in the UI folder that is not accepted. The only loss there is that the popup values do not reflect the unit ui in the global mod, and that I cannot add a parameter to getimpactpoa() for the global version of the mod because it is called in UnitInfoPopup.bsf, which in my case also means I cannot add the extra anarchy charge buff to anarchy charge impacts, but otherwise I can make the whole thing global. That's not a huge loss.

I guess I could just experiment with putting those UI files or the whole UI folder in different places in the file hierarchy to see if it takes.
Too bad, that extra buff was my favorite part.
:(

hopefully pip can enlighten me here and we can figure it out
My Mods:
Ancient Greek https://www.slitherine.com/forum/viewtopic.php?p=977908#p977908
Dark Ages Britain https://www.slitherine.com/forum/viewtopic.php?t=106417
Anarchy (Medieval) https://www.slitherine.com/forum/viewtopic.php?p=987488#p987488
Schweetness101
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 928
Joined: Tue Nov 29, 2016 6:12 am

Re: Global Mod with Edits to UI files

Post by Schweetness101 »

Schweetness101 wrote: Mon Jun 15, 2020 4:42 pm
desicat wrote: Mon Jun 15, 2020 4:41 pm
Schweetness101 wrote: Mon Jun 15, 2020 3:31 pm

thanks! that seems to work for the text files.

The UI.bsf file I've edited for the mod is in Data/Battle/Scripts, and so its edits take fine in MODS, it's just the UnitInfoPopup.bsf file in the UI folder that is not accepted. The only loss there is that the popup values do not reflect the unit ui in the global mod, and that I cannot add a parameter to getimpactpoa() for the global version of the mod because it is called in UnitInfoPopup.bsf, which in my case also means I cannot add the extra anarchy charge buff to anarchy charge impacts, but otherwise I can make the whole thing global. That's not a huge loss.

I guess I could just experiment with putting those UI files or the whole UI folder in different places in the file hierarchy to see if it takes.
Too bad, that extra buff was my favorite part.
:(

hopefully pip can enlighten me here and we can figure it out
well one thing actually I haven't tested with the C scripting is if it supports method overloading, which might be a solution at least to the getimpactpoa() method call

edit: It doesn't appear to support overloading, but I can resolve the issue just by changing the name of getimpactpoa() everywhere else outside of UnitInfoPopup.bsf, say to getimpactpoaz(), with the one extra parameter, and then define a new getimpactpoa() that just calls and returns getimpactpoaz() with 0 in the last (new) parameter, so then nothing needs to change in UnitInfoPopup.bsf
My Mods:
Ancient Greek https://www.slitherine.com/forum/viewtopic.php?p=977908#p977908
Dark Ages Britain https://www.slitherine.com/forum/viewtopic.php?t=106417
Anarchy (Medieval) https://www.slitherine.com/forum/viewtopic.php?p=987488#p987488
Post Reply

Return to “Field of Glory II: Modding”