Fixing your Half-life 2 Roleplay Gamemode!

If you have a Half-life 2 Roleplay Gamemode (OpenAura) it might be broken, and you might not know how to fix it. The Patch 129 is what broke the gamemode, in the patch it changed how files are included. But let’s get to what you server owners are really looking for, the solution.

You just need to change a few things:


First go to garrysmod/lua/includes/modules and open up openaura_core.lua.
Look for:


openAura.config:Import("../gamemodes/openaura/mysql.cfg")
openAura.config:Import("../gamemodes/openaura/owner.cfg")

You can find the two lines at line 8 and line 9.
Change that to:


openAura.config:Import("gamemodes/openaura/mysql.cfg", true)
openAura.config:Import("gamemodes/openaura/owner.cfg", true)


Second go to garrysmod/gamemodes/openaura/gamemode/openaura and open up sv_auto.lua.
Look for:


for k, v in pairs( file.Find("../materials/decals/flesh/blood*") ) do    resource.AddFile("materials/decals/flesh/"..v);
end;


for k, v in pairs( file.Find("../materials/decals/blood*") ) do
    resource.AddFile("materials/decals/"..v);
end;


for k, v in pairs( file.Find("../materials/effects/blood*") ) do
    resource.AddFile("materials/effects/"..v);
end;


for k, v in pairs( file.Find("../materials/sprites/blood*") ) do
    resource.AddFile("materials/sprites/"..v);
end;


for k, v in pairs( file.Find("../materials/openaura/limbs/*.*") ) do
    resource.AddFile("materials/openaura/limbs/"..v);
end;


for k, v in pairs( file.Find("../materials/openaura/donations/*.*") ) do
    resource.AddFile("materials/openaura/donations/"..v);
end;

Change that to:


for k, v in pairs( file.Find("materials/decals/flesh/blood*", true) ) do    resource.AddFile("materials/decals/flesh/"..v);
end;


for k, v in pairs( file.Find("materials/decals/blood*", true) ) do
    resource.AddFile("materials/decals/"..v);
end;


for k, v in pairs( file.Find("materials/effects/blood*", true) ) do
    resource.AddFile("materials/effects/"..v);
end;


for k, v in pairs( file.Find("materials/sprites/blood*", true) ) do
    resource.AddFile("materials/sprites/"..v);
end;


for k, v in pairs( file.Find("materials/openaura/limbs/*.*", true) ) do
    resource.AddFile("materials/openaura/limbs/"..v);
end;


for k, v in pairs( file.Find("materials/openaura/donations/*.*", true) ) do
    resource.AddFile("materials/openaura/donations/"..v);
end;


Third go to garrysmod/gamemodes/openaura/gamemode/openaura/libraries and open sh_config.lua.
Look for:


function openAura.config:Import(fileName)
    local data = _file.Read(fileName) or "";

Change that to:


function openAura.config:Import(fileName)    local data = _file.Read(fileName, true) or "";


Last go to garrysmod/gamemodes/hl2rp/gamemode/schema and open sv_auto and sh_auto.
In sv_auto.lua look for:


for k, v in pairs( _file.Find("../materials/models/humans/female/group01/cityadm_sheet.*") ) do    resource.AddFile("materials/models/humans/female/group01/"..v);
end;


for k, v in pairs( _file.Find("../materials/models/humans/male/group01/cityadm_sheet.*") ) do
    resource.AddFile("materials/models/humans/male/group01/"..v);
end;


for k, v in pairs( _file.Find("../models/humans/group17/*.mdl") ) do
    resource.AddFile("models/humans/group17/"..v);
end;


for k, v in pairs( _file.Find("../materials/models/deadbodies/*.*") ) do
    resource.AddFile("materials/models/deadbodies/"..v);
end;


for k, v in pairs( _file.Find("../materials/models/spraycan3.*") ) do
    resource.AddFile("materials/models/"..v);
end;


for k, v in pairs( _file.Find("../materials/models/police/*.*") ) do
    resource.AddFile("materials/models/police/"..v);
end;


for k, v in pairs( _file.Find("../materials/models/lagmite/*.*") ) do
    resource.AddFile("materials/models/lagmite/"..v);
end;


for k, v in pairs( _file.Find("../materials/halfliferp/*.*") ) do
    resource.AddFile("materials/halfliferp/"..v);
end;


for k, v in pairs( _file.Find("../models/lagmite/*.*") ) do
    resource.AddFile("models/lagmite/"..v);
end;


for k, v in pairs( _file.Find("../models/deadbodies/*.*") ) do
    resource.AddFile("models/deadbodies/"..v);
end;

Change that to:


for k, v in pairs( _file.Find("materials/models/humans/female/group01/cityadm_sheet.*", true) ) do    resource.AddFile("materials/models/humans/female/group01/"..v);
end;


for k, v in pairs( _file.Find("materials/models/humans/male/group01/cityadm_sheet.*", true) ) do
    resource.AddFile("materials/models/humans/male/group01/"..v);
end;


for k, v in pairs( _file.Find("models/humans/group17/*.mdl", true) ) do
    resource.AddFile("models/humans/group17/"..v);
end;


for k, v in pairs( _file.Find("materials/models/deadbodies/*.*", true) ) do
    resource.AddFile("materials/models/deadbodies/"..v);
end;


for k, v in pairs( _file.Find("materials/models/spraycan3.*", true) ) do
    resource.AddFile("materials/models/"..v);
end;


for k, v in pairs( _file.Find("materials/models/police/*.*", true) ) do
    resource.AddFile("materials/models/police/"..v);
end;


for k, v in pairs( _file.Find("materials/models/lagmite/*.*", true) ) do
    resource.AddFile("materials/models/lagmite/"..v);
end;


for k, v in pairs( _file.Find("materials/halfliferp/*.*", true) ) do
    resource.AddFile("materials/halfliferp/"..v);
end;


for k, v in pairs( _file.Find("models/lagmite/*.*", true) ) do
    resource.AddFile("models/lagmite/"..v);
end;


for k, v in pairs( _file.Find("models/deadbodies/*.*", true) ) do
    resource.AddFile("models/deadbodies/"..v);
end;

THEN

go into sh_auto.lua and look for:


for k, v in pairs( _file.Find("../models/humans/group17/*.mdl") ) do
    openAura.animation:AddMaleHumanModel("models/humans/group17/"..v);
end;

Change that to:


for k, v in pairs( _file.Find("models/humans/group17/*.mdl", true) ) do
    openAura.animation:AddMaleHumanModel("models/humans/group17/"..v);
end;


Basically your going into all the files that have …/, remove that and add , true after the file name. Then when you go into the sh_config you are telling the script to read the file as (fileName, true), which would be something like (_file.Find(“the file name here”, true) )
Pretty simple, but without it the gamemode wont work correctly.

Ok, I tried your method. Didnt work, it looks like I should just wait for the next update to fix it…

You may of done something wrong. Copy and pasting might not work to well because the


 messed with some of how it really is. Just go into those files, find the "../" and remove them, then add ", true" after the file name. Although in the sh_config.lua you need to change local data = _file.Read(fileName) or ""; to local data = _file.Read(fileName, true) or "";

Ok, redid the files, but now I am getting a cahce error when I join it says it DL’s, but then says it isnt when I join. I may have did the folders wrong again, but am not 100% sure.

Couldn’t include file ‘hl2rp\gamemode\cl_init.lua’ (File not found) (<nowhere>)
[cpp]
There was a problem opening the gamemode file ‘hl2rp/gamemode/cl_init.lua’

That mean anything?

Maybe you didn’t remove the …/ and add the , true for the part that it includes the cl_init.lua. Add me on steam, I can help more on there. Here

What was the point of adding , true to openAura.config:Import if it only has one argument.

[OpenAuth] You need to require the openaura_core module in init.lua!

Registering gamemode ‘openaura’ derived from ‘base’

Gamemode shows as “Base Gamemode” in server browser. Your thread didn’t help at all :frowning:

I am not absoultly sure, but all I care is that it fixes it.

Your problem you are having is unrelated to what my thread is telling people how to fix it. Try re-installing OpenAura along with Hl2RP, then attempt to fix it with this.

Well why is it deriving from the base gamemode in the first place? I’ve reinstalled twice already and nothing seems to work. I’ve done what you said both times.

Well for the server configuration are you setting the default gamemode to “hl2rp”?

No it’s openaura.

EDIT: I fixed the gamemode (it was set to openaura, my friend told me to put it that way, changed it to hl2rp) but when I join it says “Please wait while openaura initializes.” and stays as a gray screen after that.

EDIT2: Was an error with MySQL. My server works now. Thanks.

No problem. :slight_smile:

Mind if I ask what the MySQL problem is?

He probably forgot to import the openaura.sql file which configures your database for OpenAura.

Or he forgot to fill it in. :wink:

Hello, my server worked fine and then I got this unknown error.

I did all the modifications, my mysql configuration is fine also and I don’t know what’s wrong…

Do you guys have any idea of what it could be?

Thanks you for you further help ^^.

EDIT 1: Alright, well, it seems I have too many static props. When I remove my static props data the server work :). It seems the plugins needs more time to work… ^^

EDIT 2: in fact it’s the static prop plugin who needs more support and it cannot work faster… I advice you guys to don’t use static prop plugin but use an other one addon called PermaProps ;-).

My server is f’ed up,

every time I join it gives me a black screen and nothing else.

http://forum.facepunch.com/showthread.php?t=1195034