ID:150963
 
Deadron i downloaded ur newest char. handler and put it with my game and when i go to test it out I click run and then were it should make me a char. the screens black.
On 6/24/01 2:20 pm Trunx666 wrote:
Deadron i downloaded ur newest char. handler and put it with my game and when i go to test it out I click run and then were it should make me a char. the screens black.

Try downloading the demo program and let me know if that runs:

byond://Deadron.CharacterSaving

If it does run, take a look at the code it uses and it will show you what to do.
In response to Deadron
On 6/24/01 3:30 pm Deadron wrote:
On 6/24/01 2:20 pm Trunx666 wrote:
Deadron i downloaded ur newest char. handler and put it with my game and when i go to test it out I click run and then were it should make me a char. the screens black.

Try downloading the demo program and let me know if that runs:

byond://Deadron.CharacterSaving

If it does run, take a look at the code it uses and it will show you what to do.

nope still nothin
In response to Trunx666
nope still nothin

That's too specific. Could you be a little more general?
In response to Spuzzum
On 6/25/01 1:33 pm Spuzzum wrote:
nope still nothin

That's too specific. Could you be a little more general?

I tested CharacterSaving and it works for me out of the box, and I haven't gotten any other bug reports about it, so I definitely need more information to figure out if there is a problem.
In response to Deadron
well i decided to use one of you older versions of char. saving and it won't save the game at all after i make a charater here is the whole code and if you look at the half saiyan it shows one of the ways i try to change icon but it didn't work :( :

mob = /mob/choosing_character


client/proc/SaveMob()
// This saves whatever mob the player is currently using.
// It is not called automatically -- you need to call it whenever you want to save.
var/savefile/F = new("players.sav")
var/char_ckey = cKey(src.mob.name)
F["/[ckey]/[char_ckey]"] << src.mob




client/proc/LoadMob(char_ckey)
// This loads the specified character and assigns it to the client's mob var.
// Returns 1 if loading was successful, zero if not.
var/mob/new_mob
var/savefile/F = new("players.sav")
F["/[ckey]/[char_ckey]"] >> new_mob
if (!new_mob)
return 0
else
// This switches the player to the loaded mob.
src.mob = new_mob
return 1

client/Del()
// Called when the player disconnects.
// Save their character unless they quit while they were still choosing a character.
if (istype(src.mob, /mob/choosing_character))
// Don't save since they never chose a character.
return ..()

// Save.
src.SaveMob()
return ..()


mob/choosing_character

Login()

// Spawn here to avoid problems with calling prompts during login.
spawn()
src.ChooseCharacter()

proc
ChooseCharacter()
// What characters does this player have?
var/list/characters = src.CharacterList()

// Put together the menu options.
var/newCharacterChoice = "Create new character"
var/list/menu = new()
menu += characters
menu += newCharacterChoice

// Find out which character they want to play.
var/result = input("Choose a character or create a new one", "Who do you want to be today?") in menu

if (result == newCharacterChoice)
src.CreateNewCharacter() // This is for you to handle in whatever way you wish.
else
// Load the specified character.
var/success = src.client.LoadMob(result)

if (success)
// Delete myself, since I'm not longer needed.
del(src)
else
// The load failed, so give them an alert, then show them the character list again.
alert("Sorry, unable to load that character!")
src.ChooseCharacter()


CharacterList()
// Returns a list of the player's existing characters.
var/savefile/F = new("players.sav")
F.cd = "/[ckey]"
var/list/characters = F.dir
return characters


/*************
Everything below is sample code -- you will need to change it to fit your own game.
*************/

mob/choosing_character/proc/CreateNewCharacter()
// In this case, the code creates a /mob/human or /mob/ogre with the specified attributes.

// Get the character information from them. (You would probably want to do with this a browser page.)
var/prompt_title = "New Character"
var/help_text = "What do you want to name the character?"
var/default_value = key
var/char_name = input(src, help_text, prompt_title, default_value) as null|text
// src.seeadmin()

if (!char_name)
// Guess they don't want to create a new character after all, so return them to the character list.
src.ChooseCharacter()
return

// Make sure there isn't already a character named that.
// Character names are stored as ckey, so get the ckey version of the name.
var/ckey_name = ckey(char_name)
var/list/characters = CharacterList()
if (characters.Find(ckey_name))
alert("You already have a character named that! Please choose another name.")
src.CreateNewCharacter()
return

var/list/races = list("Human", "Saiyan", "Halfsaiyan", "Namek", "Triclops", "Icer", "Android","Goku","Broli")
help_text = "Which race would you like to be?"
default_value = "Human"
var/char_race = input(src, help_text, prompt_title, default_value) in races


// Okay we have enough information, so it's time to create the character and switch the player to it.
var/mob/new_mob
switch(char_race)
if ("Halfsaiyan") new_mob = new /mob/hsaiyan()
if ("Namek") new_mob = new /mob/namek()
if ("Triclops") new_mob = new /mob/triclops()
if ("Icer") new_mob = new /mob/icer()
if ("Android") new_mob = new /mob/android()
if ("Human") new_mob = new /mob/human()
if ("Goku") new_mob = new /mob/goku()
if ("Broli") new_mob = new /mob/broli()



// Set the attributes.

new_mob.name = char_name
new_mob.eye_color = eye_color

// Now switch the player client over to the new mob and delete myself since I'm no longer needed.
src.client.mob = new_mob
var/turf/first_location = locate(5, 6, 1)
new_mob.Move(first_location)
del(src)

mob
icon = 'Human.dmi'


var
eye_color
layer = MOB_LAYER+1
Login()
..()
// This is just here for this sample, to make it clear which mob you've logged into.
if (!istype(src, /mob/choosing_character))
sample_report()

// If they aren't on the map, put them there.
// if (!loc)
// loc = locate(1, 1, 1)

Write(savefile/F)
// This is sample code that keeps track of the player's last position on the map.
// Their last position is stored when the mob is saved, then reinstated when the mob
// is read in.

// First, call the default Write() behavior for mobs.
..()

// Now remember their last location.
F["last_x"] << x
F["last_y"] << y
F["last_z"] << z

Read(savefile/F)
// Call the default Read() behavior for mobs.
..()

// Now put them back on the map in their last location.
var/last_x
var/last_y
var/last_z
F["last_x"] >> last_x
F["last_y"] >> last_y
F["last_z"] >> last_z
loc = locate(last_x, last_y, last_z)

proc
sample_report()

world << "\red [name] has loged into the game!"






/mob/human
icon = 'MaleF.dmi'
life = 15
strength = 15
ki = 15
max_life = 15
max_strength = 15
max_ki = 15

/mob/goku
icon = 'Sayian.dmi'
life = 20
strength = 25
ki = 10
max_life = 20
max_strength = 25
max_ki = 15

/mob/broli
icon = 'Sayian1.dmi'
life = 20
strength = 25
ki = 10
max_life = 20
max_strength = 25
max_ki = 15

/mob/icer
icon = 'Icer.dmi'
life = 15
strength = 20
ki = 15
max_life = 15
max_strength = 20
max_ki = 15

/mob/namek
icon = 'Namek.dmi'
life = 10
strength = 10
ki = 25
max_life = 10
max_strength = 10
max_ki = 35

/mob/android
icon = 'Andriod.dmi'
life = 20
strength = 30
ki = 15
max_life = 20
max_strength = 30
max_ki = 15

/mob/triclops
icon = 'Triclops.dmi'
life = 20
strength = 20
ki = 15
max_life = 20
max_strength = 20
max_ki = 15

/mob/hsaiyan
icon = 'halfsayian.dmi'
var/plm
proc/update_plm(new_plm)
plm = usr.pl
if(pl>=50) icon = 'hssj2.dmi'
else if(pl>=5) icon = 'hssj1.dmi'
life = 20
strength = 25
ki = 15
max_life = 20
max_strength = 25
max_ki = 15



client.Del(mob)
world << "\red [usr] Left the world"
In response to Trunx666
On 6/25/01 6:09 pm Trunx666 wrote:
well i decided to use one of you older versions of char. saving and it won't save the game at all after i make a charater here is the whole code and if you look at the half saiyan it shows one of the ways i try to change icon but it didn't work :( :

Ah...well I don't support the older versions anymore, and that's too much code for me to try and debug visually.

If you want to email me your project at [email protected], I can try to see what's wrong. But I would suggest first upgrading to the latest CharacterHandling library, and copying and pasting the example code from that library first.
In response to Deadron

If you want to email me your project at [email protected], I can try to see what's wrong. But I would suggest first upgrading to the latest CharacterHandling library, and copying and pasting the example code from that library first.

ok i sent it
In response to Trunx666
u gonna send it back??
In response to Trunx666
On 6/26/01 9:43 am Trunx666 wrote:
u gonna send it back??

He does have a life, you know. =)

He'll send it when he's good and ready. I don't speak for him, of course, but I think I reflect his thoughts. =)
In response to Trunx666
On 6/26/01 9:43 am Trunx666 wrote:
u gonna send it back??

Sorry, didn't have time last night, and won't be at my computer tonight.

I'll try to look on Wednesday.
In response to Spuzzum
but I think I reflect his thoughts. =)

So do I. You keep tinfoil under your hat, too?
In response to LexyBitch
On 6/26/01 12:55 pm LexyBitch wrote:
but I think I reflect his thoughts. =)

So do I. You keep tinfoil under your hat, too?

tinfoil dosent work! duh, i use a system of wires in spyral pattern. if you would take a close look you would se (from the outside in) they run positive neg, pos neg neg pos neg pos neg neg and so on.. this works much better than tin foil.. i have found that if any waves were to escape they would be severly distorted(its not as much reflecting others brian wave as it is makeing sure no others can read yours!)
In response to jobe
On 6/26/01 2:12 pm jobe wrote:
On 6/26/01 12:55 pm LexyBitch wrote:
but I think I reflect his thoughts. =)

So do I. You keep tinfoil under your hat, too?

I alternate between that and wax paper.

tinfoil dosent work! duh, i use a system of wires in spyral pattern. if you would take a close look you would se (from the outside in) they run positive neg, pos neg neg pos neg pos neg neg and so on.. this works much better than tin foil.. i have found that if any waves were to escape they would be severly distorted(its not as much reflecting others brian wave as it is makeing sure no others can read yours!)

Hmm, but don't you get a shock from it?
In response to Spuzzum
On 6/26/01 8:13 pm Spuzzum wrote:
On 6/26/01 2:12 pm jobe wrote:
On 6/26/01 12:55 pm LexyBitch wrote:
but I think I reflect his thoughts. =)

So do I. You keep tinfoil under your hat, too?

I alternate between that and wax paper.

tinfoil dosent work! duh, i use a system of wires in spyral pattern. if you would take a close look you would se (from the outside in) they run positive neg, pos neg neg pos neg pos neg neg and so on.. this works much better than tin foil.. i have found that if any waves were to escape they would be severly distorted(its not as much reflecting others brian wave as it is makeing sure no others can read yours!)

Hmm, but don't you get a shock from it?

no, the object is to scrable all waves and megnetics that you give off. so you dont need contact with the wires.
In response to Spuzzum
On 6/26/01 10:45 am Spuzzum wrote:
On 6/26/01 9:43 am Trunx666 wrote:
u gonna send it back??

He does have a life, you know. =)

He'll send it when he's good and ready. I don't speak for him, of course, but I think I reflect his thoughts. =)

Well given some of Trunx's recent posts, my timing went from "I better get to that today" to "Hmm I'll get to that someday when I have some time to waste".

Any changes I did would be gay by default (nothing I can do about it!) and I know how much that bugs Trunx.
In response to Deadron
deadron can u answer my post below this one? about the lists in making chars?
In response to Deadron
Well given some of Trunx's recent posts, my timing went from "I better get to that today" to "Hmm I'll get to that someday when I have some time to waste".

Any changes I did would be gay by default (nothing I can do about it!) and I know how much that bugs Trunx.

Ah, didn't think about that, but of course I can sympathise.


Just to make the message a little more clear to people who don't realise,

DON'T say anything that is potentially offensive to anyone, ever. "That is gay!" is an insult to gay people. That'd be like saying, "Man, why the heck did you do that? That's so fricking Trunx of you." Words used in an insult are insulting to the owner of those monikers.

Believe me, I know this from experience. See a particular debate between me and Lexy in the Babble forum for a very good example.
In response to Spuzzum
On 6/27/01 3:22 pm Spuzzum wrote:
DON'T say anything that is potentially offensive to anyone, ever.

Well I won't go that far!

I'm quite likely to say potentially offensive things (and Lexy even more so, if I may be presumptuous).

However, it's appreciated if in saying offensive things a speaker doesn't use a gender/race/sexual orientation to do so.

Phrases like "don't Jew me down" and "that's so gay" and, to reach way back into my childhood, Pollock jokes...well there is someone out there (in fact a lot of someones) who IS the thing the speaker is mentioning, and the speaker has just helped perpetuate societal stereotypes about them. And those stereotypes are dangerous ones to have floating about. They tend to get people killed and stuff.

Plus they make said speaker look like an uneducated idiot.