1 Attachment(s)
Re: [How To] Implement New Maps - Custom Positions
After config from TUT.
First map Colorado Work fine but New Custom Map isn't working
(I try to rename ServerTest to WZ_Colorado It's work. But Custom Second map isn't working)
Attachment 130373
logss is
Code:
000000.175| Getting shop data
000000.392| Reading game rewards
000000.596| Loading armory config
000000.598| Reading loot boxes
000000.609| There is no LootBox 301131
000000.609| Starting game server
000000.609| SetHomeDir: Levels\WZ_Cliffside
000001.610| TERRAIN: LOADING Levels\WZ_Cliffside\TERRAIN
000001.613| TERRAIN2: Finished reading script file
000002.071| TERRAIN: LOADED
000002.112| Loading 'Levels\WZ_Cliffside\collections\collections.xml'
000002.112| NavMesh.Load...
000002.113| obj_ZombieSpawn 04D69F90, 50 zombies in 30 meters, delay 15, r:1.0-3.0
000002.113| !!! crashed
000002.113| Creating minidump at logss\GS_200000297fde7.dmp
000002.169| Minidump created.
Please Help
Re: [How To] Implement New Maps - Custom Positions
FrontEndWarZ.cpp
//addGameToList(id:Number, name:String, mode:String, map:String, tracers:Boolean, nametags:Boolean, crosshair:Boolean, players:String, ping:int, isFavorite:Boolean, isPassword:Boolean)
Scaleform::GFx::Value var[11];
var[0].SetNumber(ginfo.gameServerId);
var[1].SetString(ginfo.name);
var[2].SetString("GAMEWORLD");
switch (ginfo.mapId)
{
case GBGameInfo::MAPID_WZ_Colorado:
var[3].SetString("COLORADO");
break;
case GBGameInfo::MAPID_WZ_Cliffside:
var[3].SetString("WZ_Cliffside");
break;
default:
var[3].SetString("COLORADO");
break;
}
var[4].SetBoolean(false);
var[5].SetBoolean(false);
var[6].SetBoolean(false);
char players[16];
sprintf(players, "%d/%d", gd.curPlayers, ginfo.maxPlayers);
var[7].SetString(players);
var[8].SetInt(ping);
var[9].SetBoolean(gUserSettings.isInFavoriteGamesList(ginfo.gameServerId));
var[10].SetBoolean(false); // isPassword
MainNetwork.cpp
gLoginSessionPoller.ForceTick(); // force to update that we joined the game
switch(gClientLogic().m_gameInfo.mapId)
{
default:
r3dError("invalid map id\n");
case GBGameInfo::MAPID_Editor_Particles:
r3dGameLevel::SetHomeDir("WorkInProgress\\Editor_Particles");
break;
case GBGameInfo::MAPID_ServerTest:
r3dGameLevel::SetHomeDir("WorkInProgress\\ServerTest");
break;
case GBGameInfo::MAPID_WZ_Colorado:
r3dGameLevel::SetHomeDir("WZ_Colorado");
break;
case GBGameInfo::MAPID_WZ_Cliffside:
r3dGameLevel::SetHomeDir("WZ_Cliffside");
break;
}
// start the game
gameResult = PlayNetworkGame();
if
UserProfile.cpp
w.GameServerId= xmlItem.attribute("GameServerId").as_int();
w.GamePos = r3dPoint3D(0, 0, 0);
sscanf(xmlItem.attribute("GamePos").value(), "%f %f %f %f", &w.GamePos.x, &w.GamePos.y, &w.GamePos.z, &w.GameDir);
if (w.GameMapId ==3)
sscanf(xmlItem.attribute("GamePos2").value(), "%f %f %f %f", &w.GamePos.x, &w.GamePos.y, &w.GamePos.z, &w.GameDir);
else
sscanf(xmlItem.attribute("GamePos").value(), "%f %f %f %f", &w.GamePos.x, &w.GamePos.y, &w.GamePos.z, &w.GameDir);
w.GameFlags = xmlItem.attribute("GameFlags").as_int();
Error 1 error C2039: 'MAPID_WZ_Cliffside' : is not a member of 'GBGameInfo' c:\WarZ\src\EclipseStudio\Sources\Main_Network.cpp 302 Eclipse Studio
Error 2 error C2065: 'MAPID_WZ_Cliffside' : undeclared identifier c:\WarZ\src\EclipseStudio\Sources\Main_Network.cpp 302 Eclipse Studio
Error 3 error C2051: case expression not constant c:\WarZ\src\EclipseStudio\Sources\Main_Network.cpp 302 Eclipse Studio
Error 4 error C2039: 'MAPID_WZ_Cliffside' : is not a member of 'GBGameInfo' c:\WarZ\src\EclipseStudio\Sources\UI\FrontEndWarZ.cpp 3053 Eclipse Studio
Error 5 error C2065: 'MAPID_WZ_Cliffside' : undeclared identifier c:\WarZ\src\EclipseStudio\Sources\UI\FrontEndWarZ.cpp 3053 Eclipse Studio
Error 6 error C2051: case expression not constant c:\WarZ\src\EclipseStudio\Sources\UI\FrontEndWarZ.cpp 3053 Eclipse Studio
where is the error ? o.o
Re: [How To] Implement New Maps - Custom Positions
@FrontEndWarZ.cpp
Try
to rename var[3].SetString("WZ_Cliffside");
To ----> var[3].SetString("CLIFFSIDE");
and UserProfile.cpp
w.GameServerId= xmlItem.attribute("GameServerId").as_int();
w.GamePos = r3dPoint3D(0, 0, 0);
sscanf(xmlItem.attribute("GamePos").value(), "%f %f %f %f", &w.GamePos.x, &w.GamePos.y, &w.GamePos.z, &w.GameDir);
if (w.GameMapId ==3)
sscanf(xmlItem.attribute("GamePos2").value(), "%f %f %f %f", &w.GamePos.x, &w.GamePos.y, &w.GamePos.z, &w.GameDir);
else
sscanf(xmlItem.attribute("GamePos").value(), "%f %f %f %f", &w.GamePos.x, &w.GamePos.y, &w.GamePos.z, &w.GameDir);
w.GameFlags = xmlItem.attribute("GameFlags").as_int();
=======
Delete Red Line then try again to compile
Re: [How To] Implement New Maps - Custom Positions
SAME :/:
Error 1 error C2039: 'MAPID_WZ_Cliffside' : is not a member of 'GBGameInfo' c:\WarZ\src\EclipseStudio\Sources\Main_Network.cpp 302 Eclipse Studio
Error 2 error C2065: 'MAPID_WZ_Cliffside' : undeclared identifier c:\WarZ\src\EclipseStudio\Sources\Main_Network.cpp 302 Eclipse Studio
Error 3 error C2051: case expression not constant c:\WarZ\src\EclipseStudio\Sources\Main_Network.cpp 302 Eclipse Studio
Error 4 error C2039: 'MAPID_WZ_Cliffside' : is not a member of 'GBGameInfo' c:\WarZ\src\EclipseStudio\Sources\UI\FrontEndWarZ.cpp 3053 Eclipse Studio
Error 5 error C2065: 'MAPID_WZ_Cliffside' : undeclared identifier c:\WarZ\src\EclipseStudio\Sources\UI\FrontEndWarZ.cpp 3053 Eclipse Studio
Error 6 error C2051: case expression not constant c:\WarZ\src\EclipseStudio\Sources\UI\FrontEndWarZ.cpp 3053 Eclipse Studio
Re: [How To] Implement New Maps - Custom Positions
The compiler errors tell you that you did not add MAPID_WZ_Cliffside in the ENUMS in NetPacketsGameInfo.h.
Re: [How To] Implement New Maps - Custom Positions
I did this tutorial, but I'm having a bug. When I put my Cliffside map on, players spawn underr the ground, and I already added the other MapPos2.
Re: [How To] Implement New Maps - Custom Positions
JonnyTruant Same problem here, anyone can help?
Re: [How To] Implement New Maps - Custom Positions
That's error cause by "THERE IS NO BASE CONTROL POINTS" mean your map don't have control points, i'm working on it too...
Re: [How To] Implement New Maps - Custom Positions
here work 2 maps fine but back to menu in 2 in 2 minutes ?
gameserver dont crash only back to menu
Re: [How To] Implement New Maps - Custom Positions
Quote:
Originally Posted by
doidloko
here work 2 maps fine but back to menu in 2 in 2 minutes ?
gameserver dont crash only back to menu
Because you failed at aspx part, check your aspx and store procedure match, client send but server don't understand, i bet in your log must have SQL error.
Fixed: Adding Player Spawn Point, set player spawn to not null
Re: [How To] Implement New Maps - Custom Positions
WEWPS!
Okay the First thing we do is Open our Client Source (WarZ\src
\EclipseStudio\WarZ.sln)
In this File you need to open FrontEndWarZ.cpp
Go to the Line: 3050 - here you should find this:
Okay - 1 line AFTER var[2] will be var[3] where it does a little
check,
remove the whole var[3] Line!!!
Then you need to add a little switch Statement:
You will see that i added: GBGameInfo::MAPID_NEWMAP <-
This "MAPID_NEWMAP" is our "defined Map"
The line "var[3].SetString("NEWMAP"); contains the Little
Name which is Shown under MAP in the Client.
Okay if you did this go to File: MainNetwork.cpp
In this File go ahead to Line: 307
Here we need another case for out New Map. Put it UNDER! the above
Case!
As you can see i added again "GBGAmeInfo::MAPID_NEWMAP" <-
THis is again our "defined MAPID"
The SetHomeDir Contains the "Levels\MAP" Name. So if you named your
Map "Freeeeeky" then you should add "Freeeeeky" there.
(Check your Levels Folder - there are the Whole Maps, so you will
see how your
map is named xD)
Now you need to modify the File: UserProfile.cpp
Go to arround Line: 240
Under the "w.GamePos = r3dPoint3D(0,0,0);" you will find this:
There you need to add a little If Statement:
Okay thats all what we need to do in the Client.
Let's go to the Server Part. Open Up the Server Source (WarZ\bin
\server\WarZ_Server.sln)
There you need to modify following file: MasterServerConfig.cpp
Here you need to go Line 140
Here you need to add another If Statement UNDER! the "return
GBGameInfo"
Now you need to Edit: ServerGame.cpp
Go to Line: 65.
Here you need to add another case too:
Again: MAPID_NEW is our defined Mapid and NEW is the Map Name which
is in the LEVELS Folder.
Now you need to modify: NetPacketsGameInfo.h
Go to line: 30
After the MAPID_WZ_Colorado, you need to add our new MAPID_NEW:
Now you need to modify the File: AsyncFuncs.cpp
Go To Line: 475
Here you need to add a new req.AddParam under the
req.AddSessionInfo:
Okay now we need to look into our Backend: (\WarZ\src\Scripts
\WZBackend-ASP.NET)
Open the File: api_SrvCharUpdate.aspx.cs
Go to Line 20:
Here you need another Parameter so lets do it:
Okay now we need to edit: api_GetProfile1.aspx.cs
Go to line: 31
Here you need to add another xml.append:
Publish this Website now to your API Webfolder and go to the next
little set :)
Open UP SQL Management Studio, Connect to your Server and open
the Database "WarZ" and there you open the Tables:
Rightclick on the Table: dbo.UsersChars and click on "Design"
Here you need to add a New Entry:
Okay - Press Cntr+S and go to the Stored Procedures:
Rightclick on the Procedure: dbo.WZ_CHAR_SRV_SetStatus and click
modify
You will see something like this:
Under the "@in_CustomerID int, " add following:
Okay now you need to go a fewww lines down:
Delete this Whole Part and add an If Statement:
Now click on the Execute Button:
:) One love.
Re: [How To] Implement New Maps - Custom Positions
Every "solution" to this problem that has been posted in here is a terrible way of doing it. Maybe I will post what I did to solve this, or maybe I will post an alternate solution that doesnt force hardcoded values into the exes. Tho here is a hint, (Changing the MasterServer config, and the parsing of the PermGames to read in extra data)
Re: [How To] Implement New Maps - Custom Positions
Quote:
Originally Posted by
cmb
Every "solution" to this problem that has been posted in here is a terrible way of doing it. Maybe I will post what I did to solve this, or maybe I will post an alternate solution that doesnt force hardcoded values into the exes. Tho here is a hint, (Changing the MasterServer config, and the parsing of the PermGames to read in extra data)
Wait wait.... you tell me your able to read strings from File Oo
WOOOOT Okay xD Nothing special xD
Re: [How To] Implement New Maps - Custom Positions
Quote:
Originally Posted by
iKasu
Wait wait.... you tell me your able to read strings from File Oo
WOOOOT Okay xD Nothing special xD
that obviously isn't the entirety of it, that is just one small portion. It is merely a way you can get data you want into the server so you can do things with it. If you think that just reading in a couple extra bits of data from a file magically makes it so you can have multiple maps easily without hardcoding data values then you need to seriously re-examine your brain, because it seems to be broken.
Re: [How To] Implement New Maps - Custom Positions
Quote:
Originally Posted by
iKasu
Wait wait.... you tell me your able to read strings from File Oo
WOOOOT Okay xD Nothing special xD
Yeah, that's totally what he was talking about. iKasu. Sigh. You know better than that. He was talking about implementing serverside logic per-map via an entirely new system, not just reading 'strings from a file'. By the way, 'strings' is the wrong terminology.
In case you missed it, here's the part you overlooked while you were thinking everyone on RaGEZONE is a retard:
Quote:
or maybe I will post an alternate solution that doesnt force hardcoded values into the exes.
How else would you efficiently store data that changes not often enough to matter? SQL databases aren't as effective for data that doesn't require changing that often. A configuration file (such as an ini or xml) outweighs the other option (SQL database) for setting a simple variable when the server is loaded. It's called memory, you should google a tutorial on basic operating system functions if you are unsure of how memory works.