Peoples are awesome. If nobody cares my work - GTFO!
Printable View
Peoples are awesome. If nobody cares my work - GTFO!
BEAUTIFUL tutorial ! You sir, deserved my like
pretty hacky way to solve this problem, there are better more generic solutions to this.
Nice iKasu,Me and my team will try and post the results as soon as fast :)
I apologize for how rude my last comment sounded, I should not have cut it off like that and should have elaborated on what I meant. So I will do just that below.
Sure, instead of hardcoding values and data, you would add support for reading them in dynamically either from data sent from the server (the best way) or through some local .ini file (not the best way).
I will try to describe in short detail when I say dynamically getting data from the server. Instead of the client "knowing" the information (i.e. initial map spawn position, map path, etc..) the client ends up actually knowing NOTHING on it's own, but depends on the server to tell it all it's information. First the client would receive the serverlist from the server, with basic info like server name, playercount, map name, w/e. Then when the client wants to enter in the server, the server which KNOWS all the needed info (map name, map path, etc..) will tell the client everything it wants to know, so the client knows what files to load, and where it will want to spawn the player. Also, through this method we can effectively eliminate the DB changes you will want to make, as the player does not persist in the map world meaning we don't need to store the mapid, this is because the player is forced to choose a server everytime they play. A problem you will run into is that player position persists when the logout, so when they re-enter the game they are where they were when they logged out. A real simple solution to this is to force players to spawn on spawnpoints on the map on server entry. This is ofcourse only one way that I thought up, the beauty of working on software is just how flexible you can be when approaching problems.
Very Nice Tut works for me with Map Cliffside thank you!
req.AddParam("map", slot.GameMapId);
Is correct?
or you mean
req.AddParam("map", GameMapId);
Without the identifier slot?
Because, in my AsyncFuncs, slot is not a declared identifier...
http://puu.sh/2PuSf.png
For me work without slot :)
http://puu.sh/2Pv15.png
;)
Map problem? Hmm i will test more....
http://puu.sh/2PF3y.jpg
Ok, my problem is:
Chars still spawning in zone 0
And... if chars die, chars dont get revive time left...
Chars still live in character menu...
:S
I fixed that everyone spawns on the same spot, and your last logout point is remembered (as long as you not connect to a other map, when you play cliffside then go on a colorado server and come back to cliffside you spawn on a random player spawn) <- Has to be fixed i look in to it too :).
You just forgot to add inside api_GetProfile1.aspx.cs : Line 34
below
add this:Code:xml.Append(xml_attr("GamePos", reader["GamePos"]));
Code:xml.Append(xml_attr("GamePos2", reader["GamePos2"]));
Nice tutorial.
We have the same xml.Append in 2 files:
File: api_SrvNotes
Line: 39
and
File: api_GetProfile1
Line: 34
I will add GamePos2 in both and share results!
I get this error:
Code:
Code:000000.087| WO_API: failed with error code 5 SQL Connect failed
000000.087| GetShopData FAILED, code: 5
000000.087| Reading game rewards
000000.090| WO_API: failed with error code 5 SQL Connect failed
000000.090| ApiGetDataGameRewards FAILED, code: 5
000000.090| !!! ERROR: failed to get game rewards
000000.090| !!! crashed
I have to work now, later i will try to fix it.
Nice
Thank you
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
Please HelpCode: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.
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
@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
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
The compiler errors tell you that you did not add MAPID_WZ_Cliffside in the ENUMS in NetPacketsGameInfo.h.
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.
JonnyTruant Same problem here, anyone can help?
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...
here work 2 maps fine but back to menu in 2 in 2 minutes ?
gameserver dont crash only back to menu