PDA

View Full Version : Trying to make an RPG kinda mod


MDN14
11-23-2004, 07:24 AM
I am trying to make an RPG kinda mod, and I am not very good at coding. Here is what I want to do, and if anyone could help me with it I would be very grateful:


These are console commands everyone can use, even when not logged into admin:

/listPlayers - this lists the players names, client number, total credits, and profession in the console.

/save (password) - This saves a .plr file on the server in a folder called profiles which matches the players name (example: {LD}EniGmA.plr) The password is saved in the profle and is used to load the profile when that player connects to the server again. When you do this command, the server first checks to see if there is already a profile for the player with that name. If there isnt, it makes a new one, if there is then it displays a message saying the profile cannot be saved because a profile of the same name already exists. To save a profile after you already have one, you will need to have that profile loaded already.

/load (password) - This makes the server look for a .plr file with the same name as the player who did this load command (example: I come into a server with the name {LD}EniGmA, then do /load password. The server will check for a .plr file named {LD}EniGmA.plr, the profiles are case sensitive). It will then check the password in the profile to see if it matches the one that the player typed when they did the load command.

Profiles:
These profiles are all saved in a folder called profiles in the mod directory. The profiles
are saved when the player does the /save (password) command. Here is what goes in thes
.plr files:

Example .plr file, it is alot like xml format:

{LD}EniGmA.plr is the fle name

This is what is in the actual file:
<profile> //This is the first line in the .plr file
<Profile name={LD}EniGmA> // This matches the name of the .plr file, it helps with keeping server adminsitrators from tampering with the files by making them hard to change
<Player name={LD}EniGmA> // This is the name of the player in game when the profile was saved. This needs to match the players name when the file is loaded, so it should be the same thing as the name of the .plr file. This also helps wih anti-tampering.
<Password="password"> // This is the password that it checks when loading the profile to see if the player typed in the right password.
<Credits=5000> // This shows how many credits the player had when the profile was saved. When te player loads his profile, the credits get loaded so the player has the ammont of credits he had when he left the server. Max credits is 999,999.
<Model=models/phazon_samus/default // This is the model the player was using when he saved the profile. It changes the players model to this when the profile is loaded if the player is using a different model at the time of it being loaded.
<Weapons=WP_BLASTER|WP_LIGHTSABER|WP_REPEATER> // This specifies the weapons the player had when he saved the profile. When the profile is loaded it should give the player these weapons. The weapons are seperated by a |. ( shift + \ = | )
<Ammo=Blaster=300|PowerCell=200|MetallicBolts=300|R ockets=6> // This specifies how much ammo for each thing the player had when the profile was saved. It should give the player the same ammount of ammo when he loads the profile. The ammo is seperated by a |. ( shift + \ = | )
<Items=HI_JETPACK|HI_CLOAK> // This specifies what items the player had when the profile was saved. He should get these items again when the profile is loaded. The items are seperated by a |. ( shift + \ = | )
</profile> // This is the last line in the .plr file Anything after this line needs to have // before it and it is just a comment, not actually loaded with the profile


I wish tab spacing worked here, it would be much easier to read :/ Also, this will be a client side mod, so I dont care if any client side coding is required

razorace
11-23-2004, 09:14 AM
If you're doing something RPG related I suggest you talk to unique over at the AotCTC (www.aotctc.com) since he's working on the same thing.

Secondly, for all your file parsing stuff, check out the way the game loads the NPC files and the siege files. That will get you going.

MDN14
11-23-2004, 11:33 AM
I alreayd have looked at those, and made some of my own. That is what I based the .plr file off of. Thanks for the link though :)

razorace
11-23-2004, 11:50 AM
Well, I suggest that you at least try to work with unique on this. There's no point in retreading work when you don't have to.