ID:150316
 
Well I have "Create Character/Delete Character/Quit" in my login() code, but, when I run my game it doesnt come up, it skips that part and goes straight to the character choosing screen.

If I was at home I would post the code that I have but it will have to wait for alittle bit, as I will be home soon (just at college at the moment, hehe.)

I hope someone knows what I am going on about, if not I will have to show you the code I am using.

Lee
Yes, code would help a lot..I dont see a way we could know what you are talking about(Because if its Deadrons lib, you've messed around with it and we need to see what you've done. If its not, we dont know what you've done.)

Alathon
In response to Alathon
Here is the code:

------------------------------------------------------------
//Character Login
world
mob = /mob/creating_character /*be sure to add this or else they wont create a character*/
name = "Superstitous and Beyond"

/*this is the creation of making a character, just edit this a little*/
#define BASE_MENU_CREATE_CHARACTER "Create New Character"
#define BASE_MENU_DELETE_CHARACTER "Delete Character"
#define BASE_MENU_CANCEL "Cancel"
#define BASE_MENU_QUIT "Quit"

mob/creating_character

Login()
// Spawn here to avoid problems with calling prompts during login.
src.CreateCharacter()

proc/CreateCharacter()
// In this case, the code creates a /mob/human 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"
var/help_text = "Welcome to Superstitous and Beyond"
var/default_value = key
var/char_name = input(src, help_text, prompt_title, default_value) as null|text

// Okay we have enough information, so it's time to create the character and switch the player to it.
var/mob/new_mob
var/choice = input("What is your race?") in list("Nichrechian","Turamonian","Salamachian","Assainian")
if(choice == "Nichrechian")
new_mob = new/mob/Nichrecha()
world << "[usr] Has Just Logged In"
new_mob.loc = locate(1,1,1)
usr.loc = locate(1,1,1)
if(choice == "Turamonian")
new_mob = new/mob/Turamo()
world << "[usr] Has Just Logged In"
new_mob.loc = locate(1,1,1)
usr.loc = locate(1,1,1)
if(choice == "Salamachian")
new_mob = new/mob/Salama()
world << "[usr] Has Just Logged In"
new_mob.loc = locate(1,1,1)
usr.loc = locate(1,1,1)
if(choice == "Assainian")
new_mob = new/mob/Asalo()
world << "[usr] Has Just Logged In"
new_mob.loc = locate(1,1,1)
usr.loc = locate(1,1,1)
// Set the attributes.
new_mob.name = char_name

// Now switch the player client over to the new mob and delete myself since I'm no longer needed.
src.client.mob = new_mob
del(src)
usr << "\bold \blue Superstious and Beyond"

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, if we have a map, remember their last location.
if (world.maxx)
F["last_x"] << x
F["last_y"] << y
F["last_z"] << z

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

// Now, if we have a map, put them back on the map in their last location.
if (world.maxx)
var/last_x
var/last_y
var/last_z
F["last_x"] >> last_x
F["last_y"] >> last_y
F["last_z"] >> last_z


mob
Nichrecha
icon = 'player.dmi'
icon_state = "blue"
Turamo
icon = 'player.dmi'
icon_state = "orange"
Salama
icon = 'player.dmi'
icon_state = "green"
Asalo
icon = 'player.dmi'
icon_state = "yellow"
//Character login finished
------------------------------------------------------------

Hope that helps,

Lee
In response to Mellifluous
I only looked at the mob/Login() and the proc, and those are fine. But just as a side note, in the switching of race or whatever, you might as well save yourself 3 lines per if and put the loc's, and the entered msg outside of the entire switch statement, since its the same in all cases.

If you are using Deadrons library, I believe it's taking over and somehow bypasses it(although it shouldnt, by default anyways). Im not so sure about his Library, I dont really use it. Anyways, try to look through any files you have included, and look for places with a mob/Login() or client/New()

Alathon
In response to Alathon
Ok, thanks Alathon.

Lee
In response to Mellifluous
As a small mayby-fix, try including the rest of the Logins()

Ie. Add ..() before src.CreateCharacter() or whatever

Alathon
In response to Mellifluous
Do you have this somewhere, or are you only allowing one character?

client
base_num_characters_allowed = 2 //or more


If I understand you correctly, it may be because if you only allow 1 character, character handling by default just logs you into that character.
In response to Flick
Flick wrote:
Do you have this somewhere, or are you only allowing one character?

client
> base_num_characters_allowed = 2 //or more

If I understand you correctly, it may be because if you only allow 1 character, character handling by default just logs you into that character.

No I havent got that in.

[EDIT] Alathon I have used "..()" just before src.CreateCharacter and it still does not work, so I will try Flicks idea and put in a higher number of character saves.

Lee

[EDIT2] Flicks idea is not working either, shall I just leave that out for now?

[EDIT3] I forgot to mention I am not using any libs what so ever.
In response to Mellifluous
Explain for me exactly what is happening. When you log in, does it just log you directly into the game? Or does it have you create a new character each time? I'm still not real clear on what is happening.

flick()

In response to Flick
Well, I do log in and it asks for your name then you choose your character, but what is getting me is that it is not initiating the create character/delete character/quit part.

Lee
In response to Mellifluous
Mellifluous wrote:
Well, I do log in and it asks for your name then you choose your character, but what is getting me is that it is not initiating the create character/delete character/quit part.

Lee

Are you talking about this?

#define BASE_MENU_CREATE_CHARACTER "Create New Character"
#define BASE_MENU_DELETE_CHARACTER "Delete Character"
#define BASE_MENU_CANCEL "Cancel"
#define BASE_MENU_QUIT "Quit"

These are simply definitions used withing the internal implementation of Deadrons CharacterHandling. They don't 'do' anything, they simply define values for later use. Deadron seems to not like quotation marks within his input() procs :) I'm not real sure why they are even with the rest of this, as they are located within a seperate file in his library.

flick()


In response to Mellifluous
Mellifluous wrote:
[EDIT3] I forgot to mention I am not using any libs what so ever.

You are using a library, which is my CharacterHandling library.

If you zip up the project and email it to me at [email protected], I can look to see what's wrong. It's possible you are overriding client.New() or something and bypassing some of the library behavior.
In response to Deadron
Deadron wrote:
Mellifluous wrote:
[EDIT3] I forgot to mention I am not using any libs what so ever.

You are using a library, which is my CharacterHandling library.

If you zip up the project and email it to me at [email protected], I can look to see what's wrong. It's possible you are overriding client.New() or something and bypassing some of the library behavior.

I thought this looked like a bit of a bastardized version. I just don't see Deadron putting this within anything he wrote:

/*this is the creation of making a character, just edit this a little*/

:)
flick()

In response to Deadron
Deadron wrote:
Mellifluous wrote:
[EDIT3] I forgot to mention I am not using any libs what so ever.

You are using a library, which is my CharacterHandling library.

If you zip up the project and email it to me at [email protected], I can look to see what's wrong. It's possible you are overriding client.New() or something and bypassing some of the library behavior.

Ok, I will do that right now.

Thanks Deadron

Lee
In response to Mellifluous
Mellifluous wrote:
Ok, I will do that right now.

Just so you know, I may not get to this until tomorrow, as I will be out tonight.
In response to Deadron
Deadron wrote:
Mellifluous wrote:
Ok, I will do that right now.

Just so you know, I may not get to this until tomorrow, as I will be out tonight.

That is ok, I dont expect you to do it as soon as it arrives as you do have a life ;)

I dont make anyone do anything, dont want to and dont intend to make people either.

I hope you have a good time aswell,

See ya,

Lee