Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Implementing Races?


Megarude
 Share

Recommended Posts

Okay… I want my game to have at least four different races.  Of course I want them to all look different, but I'm new at this and I really don't know where to start.  I want to be able to choose a character race wen making a new character instead of choosing Body/Legs/Head.  How would I do this?
Link to comment
Share on other sites

Hi welcome to the Eclipse forum!

First of all, this doesn't go into the source code board. Second of all, it's called character classes which can be added/changed/deleted from there.

[http://www.touchofdeathforums.com/smf/index.php/topic,38007.0.html](http://www.touchofdeathforums.com/smf/index.php/topic,38007.0.html) Here's the tutorial for this.

Also i recommend reading all of these tutorials for better game:

[http://www.touchofdeathforums.com/smf/index.php/topic,36286.0.html](http://www.touchofdeathforums.com/smf/index.php/topic,36286.0.html)

-Ridrik
Link to comment
Share on other sites

You could do it the easy way, or you could code it.

If you do it the easy way, rename the starting class to Race, instead of classnames you set them by racename. Create a folder in your server directory. In this example "playerfiles". Make an input under the Sub OnJoin

```
RACE = GetPlayerClassName(Index)
Call putvar("playerfiles\" & getplayername & ".ini", "RACE", "race", (RACE))

```
This will create a file for each new player saying that they are a specific race.
Then you need to make the real classes you want in your game and set them locked=1.

Then you can make some sort of newbie Island or tutorial/introduction to the game where they can choose class. The trick is that you will keep the Sprite from your original class so all you need to do is to set each class different sprites as usual.

Whenever you want to call some race specific function you can use the:

```
GetVar("playerfiles\" & getplayername(Index) & ".ini", "RACE", "race")

```
And you will get your character race.

That's just the easy way to do it :)

EDIT:
Was a new post while I was posting, use the tutorial to create the locked classes and races
Link to comment
Share on other sites

I know how to add Classes, I've read those tutorials.  I want new players to be able to choose what their character will look like.  Which is what I meant by "races."  I don't like the "Choose Body/Legs/Head" option, I'd like to have a drop down menu with different looking sprites from which they can choose.
Link to comment
Share on other sites

Elen, what are you talking about. He is not a scripter yet, barely a beginer and you offer him a code ;) He asks for the classes.

And no, that's the hard way for him.

*EDIT: Oh well that's sprite changes… And you need to do lots of works + scripts.
Link to comment
Share on other sites

You might be right, just added my opinion on how I would do it and that it doesn't really need sourcecoding. Could easily be scripted :).

So I would vote for a move :)

EDIT:
Was a new post AGAIN as I typed (I must be slow)
@Megarude:

> I know how to add Classes, I've read those tutorials.  I want new players to be able to choose what their character will look like.  Which is what I meant by "races."  I don't like the "Choose Body/Legs/Head" option, I'd like to have a drop down menu with different looking sprites from which they can choose.

Well in your data.ini there is a var saying Custom=1, set it to 0\. Then you need to go to your Class*.ini and set the sprite number for the character you want to assign to each class.
Link to comment
Share on other sites

Finally… thank you.  I still have one more problem though, I want each class to have at least 4 different types of Sprites they can choose from besides male/female.  In other words, the sprites will define the "race" and every race can choose from any Class, is what I'm trying to do.
Link to comment
Share on other sites

I haven't tried that to be honest, if you want different sprites to choose from for each class I would say you need to edit the source, but still haven't got Eclipse to test it. Don't think that it supports it since it only reads 1 variable in the source from the class*.ini (If I remember it correctly)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...