Global Mod with Edits to UI files
-
Schweetness101
- Captain - Heavy Cruiser

- Posts: 928
- Joined: Tue Nov 29, 2016 6:12 am
Global Mod with Edits to UI files
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
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
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

- Posts: 28320
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Global Mod with Edits to UI files
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.
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


-
Schweetness101
- Captain - Heavy Cruiser

- Posts: 928
- Joined: Tue Nov 29, 2016 6:12 am
Re: Global Mod with Edits to UI files
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 merbodleyscott 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.
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
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

- Posts: 928
- Joined: Tue Nov 29, 2016 6:12 am
Re: Global Mod with Edits to UI files
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.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.
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
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

- Posts: 28320
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Global Mod with Edits to UI files
I was not aware that it didn't work. One for Pip again please. And let me know what he replies.Schweetness101 wrote: ↑Mon Jun 15, 2020 3:17 amdoes 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.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.
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


Re: Global Mod with Edits to UI files
I found a way to get the text files working for the Global TT Mod.Schweetness101 wrote: ↑Mon Jun 15, 2020 3:17 amdoes 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.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.
The text files need to be within a Text subfolder in the Global Mods Data folder, just like the main game files!


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.
Field of Glory II Medieval Scenario Designer.
FOGII TT Mod Creator
Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
-
pipfromslitherine
- Site Admin

- Posts: 9882
- Joined: Wed Mar 23, 2005 10:35 pm
Re: Global Mod with Edits to UI files
IIRC the documentation does apologise for the differences in folder layout between global mods and campaigns. 
Cheers
Pip
Cheers
Pip
follow me on Twitter here
-
Schweetness101
- Captain - Heavy Cruiser

- Posts: 928
- Joined: Tue Nov 29, 2016 6:12 am
Re: Global Mod with Edits to UI 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
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

- Posts: 928
- Joined: Tue Nov 29, 2016 6:12 am
Re: Global Mod with Edits to UI files
haha no problem, and can global mods take edits to files in the UI folder?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
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
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
Re: Global Mod with Edits to UI files
Too bad, that extra buff was my favorite part.Schweetness101 wrote: ↑Mon Jun 15, 2020 3:31 pmthanks! 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.
-
Schweetness101
- Captain - Heavy Cruiser

- Posts: 928
- Joined: Tue Nov 29, 2016 6:12 am
Re: Global Mod with Edits to UI files
desicat wrote: ↑Mon Jun 15, 2020 4:41 pmToo bad, that extra buff was my favorite part.Schweetness101 wrote: ↑Mon Jun 15, 2020 3:31 pmthanks! 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.
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
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

- Posts: 928
- Joined: Tue Nov 29, 2016 6:12 am
Re: Global Mod with Edits to UI files
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 callSchweetness101 wrote: ↑Mon Jun 15, 2020 4:42 pmdesicat wrote: ↑Mon Jun 15, 2020 4:41 pmToo bad, that extra buff was my favorite part.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.
hopefully pip can enlighten me here and we can figure it out
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
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

