Page 1 of 1
Global Mod with Edits to UI files
Posted: Fri Jun 12, 2020 3:20 am
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
Re: Global Mod with Edits to UI files
Posted: Fri Jun 12, 2020 7:23 am
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.
Re: Global Mod with Edits to UI files
Posted: Sat Jun 13, 2020 1:04 am
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
Re: Global Mod with Edits to UI files
Posted: Mon Jun 15, 2020 3:17 am
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.
Re: Global Mod with Edits to UI files
Posted: Mon Jun 15, 2020 9:53 am
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.
Re: Global Mod with Edits to UI files
Posted: Mon Jun 15, 2020 11:31 am
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!
cheers
Paul
Re: Global Mod with Edits to UI files
Posted: Mon Jun 15, 2020 3:03 pm
by pipfromslitherine
IIRC the documentation does apologise for the differences in folder layout between global mods and campaigns.
Cheers
Pip
Re: Global Mod with Edits to UI files
Posted: Mon Jun 15, 2020 3:31 pm
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.
Re: Global Mod with Edits to UI files
Posted: Mon Jun 15, 2020 3:32 pm
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?
Re: Global Mod with Edits to UI files
Posted: Mon Jun 15, 2020 4:41 pm
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.
Re: Global Mod with Edits to UI files
Posted: Mon Jun 15, 2020 4:42 pm
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
Re: Global Mod with Edits to UI files
Posted: Mon Jun 15, 2020 4:54 pm
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