NumberWan Posted June 11, 2014 Posted June 11, 2014 I was wondering, whether it is possible to run a mod in SP through a script. For instance a Player reaches a certain place and touches a trigger. Then a script runs a command to load a mod. If a script is of no use here, I wonder if it is possible to run a certain mod through a command in a menu (like the TIER menus with missions). The problem is that I can't understand which command runs a mod. The section of the main menu in JA has a list of added modifications, you just choose one and then click the button to load it. Having looked through the *.menu files, I found no evident code, which I need. What would it be like? By the way, does the type of a mod matters? E.g. a mod that loads a different map, a mod that replaces a Player model, a mod that changes the model of a weapon, etc. Should this be taken into account?
Asgarath83 Posted June 11, 2014 Posted June 11, 2014 interessing question, i try to study the Ui of load mods menu for that. but i think is hardcoded in ui part of the code, as all the Ui interface. :|should be great however loading mod with the Ui command and tier, because in that mode is possible to make a mod modular and switch between modules in the story progression *_*i make a long mod project and that's should be really useful. i end my lightning code staff so i can try of check something in the Ui files. but i thinkg there is not a really command but a function that go to some definition \ declaration of the code. NumberWan likes this
NumberWan Posted June 11, 2014 Author Posted June 11, 2014 @@Asgarath83That's what I thought. I looked through the menu code, it's easy to make a certain map run from it, or music, or sound, among some other things. But running a mod, which would replace flechette, for instance, to a different weapon, would be just awesome. I still have hopes, that there is a solution. I see two ways here, but probably none of them actually works... Perhaps @@MoonDog or @@GingerbreadNinja have the answer.
ent Posted June 11, 2014 Posted June 11, 2014 fs_game "modFolderName" Asgarath83 and NumberWan like this
Asgarath83 Posted June 11, 2014 Posted June 11, 2014 fs_game "modFolderName"Wow! Thanks @@ent!!! @@NumberWan All for you!
NumberWan Posted June 11, 2014 Author Posted June 11, 2014 Thanks a lot, @@ent. You too, @@Asgarath83
Asgarath83 Posted June 11, 2014 Posted June 11, 2014 That's open IMMENSE modding possibility! *.*My pleasure, NumberWan mmmm lol, i remember now that if i open a batch file of a mod for run outside of JKA with the notepad, i see something like example fs_game,for example, my mod batch file is:openjk_sp.x86 +set sv_pure 0 +set fs_game Nosgoth +exec nocrash.cfg %1 %2 %3 %4 %5 %6 %7 %8 %9i had ignored that fs_command can be executed also in the Ui menu, that's is WONDERFUL!!! 8D
NumberWan Posted June 11, 2014 Author Posted June 11, 2014 The question is whether you can use fs_game to load a mod, which is in GameData/mymod folder? Should I write just fs_game mymod?Also this folder has simply a pk3 inside, which includes a model inside. Should this work then? I just tried to make a button in the menu (it works just fine with any other command), which would use fs_game to run a mod from a folder. But on various occasions the game showed several messages, for instance "fs_game is write protected". In the setup menu there is a section - Mods. There is a line "uiscript RunMod ;". this what confuses me... Currently the button looks like this: action{exec "soundstop";play "sound/interface/button1.wav" ;close all ;fs_game mymod} Or should it look like this: action{exec "soundstop";play "sound/interface/button1.wav" ;close all ;RunMod "Mymod"}
Asgarath83 Posted June 11, 2014 Posted June 11, 2014 Mods need to stay on Gamedata folder for running with fs_game command properly. the problem i thinks is not the run of the mod, but the encrypting of the pk3 or something like else. O.ofor your question, i never done that's thing, so i cannot have the answer. i can suggest you to make how i make with code, try and error, at the end, afgter a thousand of time i understood how should be work.i hope that someone have a better answer about that. :Show is the original "RunMod" command line of the mod menus?
NumberWan Posted June 12, 2014 Author Posted June 12, 2014 @@entWait, there are lots of mods which do not have any dlls inside, and they work just fine. The game loads them perfectly. Or do you mean something else?
ent Posted June 12, 2014 Posted June 12, 2014 I mean if the mod folder (the one that is in GameData, for example "japlus") does not contain DLLs (could be in pk3) then it's not recognized as a mod folder, and if you do fs_game "modFolder" and that one does not exist or doesn't contain DLLs then it will create one with base DLLs. By mod I mean code modification, not media.
NumberWan Posted June 12, 2014 Author Posted June 12, 2014 When I loaded a pk3 as a mod, it only created jaconfig.cfg. Perhaps fs_game won't be of use here then?The purpose was to upload additional *.pk3 from a folder different from gamedata/base.
Asgarath83 Posted June 12, 2014 Posted June 12, 2014 for testing my mod, i place a folder called "Nosgoth" into gamedata with all the staff not zipped in pk3 because i am again in the editing parts. also, now i am working to code, i save the old exe of jka and replace the jax86dll and the openjk_86 exe for test the mod, every time i edit and build the code, i replace exe and dll of SP. i the mod contain some DLL the game read before the dll of the pk3 and not the dll of the game.that's is what i know. if you use the dark force mod of filefront and put into gamedata, the mod replace the code of the MP game, so the Jamp not read the dll of the gamedata folder about the MP , but the dll of the dark force pk3.
NumberWan Posted June 12, 2014 Author Posted June 12, 2014 @@ent @@Asgarath83None of the mods installed in JA directory have a dll anywhere, and the game sees them as mods in the modlist, and they can be uploaded in the menu. It's just a pk3 inside, which includes maps, models, scripts and other things. Some of the mods don't even have an exe file to run them from desktop. There must be something else. Perhaps you were referring to MP instead of SP?
ent Posted June 12, 2014 Posted June 12, 2014 I was talking about MP, sorry. I am not aware of SP at all.
eezstreet Posted June 12, 2014 Posted June 12, 2014 SP (via OpenJK) can load DLLs from the respective fs_game folder. However, unlike MP it doesn't unload DLLs from the PK3s. (Also the load order includes an extra step to load from Gamedata)
Asgarath83 Posted June 12, 2014 Posted June 12, 2014 my competence is the SP. i ever played more the SP then the MP packs. SP mods not need dll or something other, yes. need simply a folder called with mod name, fs_game simply tell to the exe of the game of run game by that folder and gamedata. the folder contains overwrite the Base contains. However, i not play never mod by the inside mod menu, but by the batch file of the mod putted into gamedata? motivation? mod runned by batch files got less bugs of mod runned by UI interface of menu, but the ui mod menu use a code configuration, not the fs_game command, and the fs_game command is used on all the batch files of mods, so i suppose fs_game command can be use in Ui menu without big troubles.
NumberWan Posted June 13, 2014 Author Posted June 13, 2014 I was talking about MP, sorry. I am not aware of SP at all.That's what I thought. SP (via OpenJK) can load DLLs from the respective fs_game folder. However, unlike MP it doesn't unload DLLs from the PK3s. (Also the load order includes an extra step to load from Gamedata) What about mods, which do not involve DLL. There are lots of them, and the game loads them perfectly. @@Asgarath83Truth. So perhaps the game understands better, when it loads a mod via a bat file rather than the one, when you upload it through a menu inside the game? Hmmm.
afi Posted June 15, 2014 Posted June 15, 2014 Personally I've always used uiScript RunMod "xxx" which is also used in the original setup menu For example: action { play "sound/interface/button1.wav" ; close all ; uiScript RunMod "total-tffa"; exec "map mp/duel3"; } NumberWan and Asgarath83 like this
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now