Author Topic: Iban Explains it All  (Read 24251 times)

I don't even know what version of CityRPG you have and I can't remember how I did clothing back then. I think outfits listed specific nodes and their corresponding color ID on the array is what painted it. There were exceptions for things like "skin" and "gender" but for the most part it was raw input.

I just reread your post and it's more focused on the instantination of a new profile when a client enters the server. Look at sassy.cs (or don't because sassy is loving terrible) and find the functions called in package.cs in GameConnection::onClientEnterGame.

I don't even know what version of CityRPG you have and I can't remember how I did clothing back then. I think outfits listed specific nodes and their corresponding color ID on the array is what painted it. There were exceptions for things like "skin" and "gender" but for the most part it was raw input.

I just reread your post and it's more focused on the instantination of a new profile when a client enters the server. Look at sassy.cs (or don't because sassy is loving terrible) and find the functions called in package.cs in GameConnection::onClientEnterGame.
Do you have any databases you would recommend using? I just realized scriptojects are much more efficient for storing data and using it than arrays or any variable type. I have attempted creating saving systems that used local and global variables assigned for players and it was just a mess. I would like to be able to use a database and experiment before I go writing my own.

I have used this in the past to store data:

Code: [Select]
function CreateDataSO()
{
if(isObject(DataSO))
DataSO.delete();

if(isFile("config/server/SaveData.cs"))
exec("config/server/SaveData.cs");

if(!isObject(DataSO))
new ScriptObject(DataSO){};

for(%a=0; %a<ClientGroup.getCount(); %a++)
LoadData(clientgroup.getobject(%a));
}

function SaveData(%cl)
{
if(!isObject(DataSO))
CreateDataSO();
DataSO.SaveData[%cl.bl_id] = %cl.info TAB %cl.name;
DataSO.Save("config/server/SaveData.cs");
}

function LoadData(%cl)
{
if(!isObject(DataSO))
return CreateDataSO();
%path = DataSO.SaveData[%cl.bl_id];

if(%path $= "")
DataSO.SaveData[%cl.bl_id] = 0 TAB %cl.name;
%cl.info = getWord(%path, 0);
//would of course be repeated for more information loading
}

function DeleteData(%cl)
{
if(!isObject(DataSO))
CreateDataSO();
DataSO.SaveData[%cl.bl_id] = "";
SaveData(%cl);
LoadData(%cl);
}

I haven't really tested this, but it should work fine.

it doesn't really look like it would work at all?

it doesn't really look like it would work at all?

what, why?  It works fine so far.   This is a question?

Do you have any databases you would recommend using? I just realized scriptojects are much more efficient for storing data and using it than arrays or any variable type. I have attempted creating saving systems that used local and global variables assigned for players and it was just a mess. I would like to be able to use a database and experiment before I go writing my own.
You could use my blockByte system or just write your own because that's always fun.

You could use my blockByte system or just write your own because that's always fun.
Blockbyte was used in DRPG right? I took a look at it and I will try to figure it out.

Just a question, any way to download the Torque Appendix as a .pdf file?
I was being dumb and not paying attention.
« Last Edit: May 20, 2011, 07:19:28 PM by Daenth »

I'm considering posting the saving system used in a new version of CityRPG I've stopped working on.

How interested are people in this?

I'm considering posting the saving system used in a new version of CityRPG I've stopped working on.

How interested are people in this?
Very much so

for ligtscene its for dramatic things, heres my code

Code: [Select]
package Lightscenesetup

function clientcmdlightscene(%client)
{
// first put lightscene always force
lightscene('',"alwaysforce");
// then we have to msg the user
Commandtoclient(%client,"lightscene complete")
}
[code]
edit:  with package[/code]
« Last Edit: June 17, 2011, 04:24:14 PM by clinr121 »


Erm ya your right i still need learning TGE though

Erm ya your right i still need learning TGE though
Just remember that scripts and computers won't be able to understand plain english commands like "lighting complete" without additional work.

Thank you Iban now I can finally script!