The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom player given name and more
Author Message
mtprimo
Apprentice
*

Posts: 3
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Jun 2015
Reputation: 0



Post: #1
Custom player given name and more
Hey guys.

Got a question here, i really dont have any idea on, hope someone have any. This is for my roleplay server.

I was trying to make a system where the player gives another player a name he chooses/ hear, pretty much like real life, you'll call and know the person by the name he gives or that you hear anyone saying.

Another question is to disable magic/spells. It is supposed to be a low fantasy player driven roleplay shard, so there wouldn't be magic fireballs flying around or monsters. Tried to check on sphere.ini but there are only like magic words i can turn off and so on, someone tried this aswell?


Thanks in advance.
(This post was last modified: 06-20-2015 04:17 AM by mtprimo.)
06-19-2015 09:39 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #2
RE: Custom player given name and more
About names, 4 problems.
Sending the chosen name when player enters the "visual range" of another player.

Displaying the chosen name when players open your paperdoll.

Displaying the chosen name when players open your health/mana bar.

Avoiding NPC saying your "true name", this one is the easiest, just look in the various speech files.

You said that your shard will be a roleplay one, so I suggest to NOT implement this name behaviour, but to "force" players to roleplay this behaviour.

The point is that implementing your name system will take a lot(some?) effort (and i think also in performance), and while it's a nice idea it's a feature that your players can do by just roleplaying.


For disabling spells, you have two options:
Deleting all the spells inside sphere_spells.scp, if you do this you should also remove all the spell references in the various magical scrolls/potions and so on.

So i suggest to add the flag SPELLFLAG_DISABLED, to each spell you don't want to use.
Example
PHP Code:
[SPELL 18]
DEFNAME=s_fireball
NAME
=Fireball
SOUND
=snd_spell_fireball
RUNES
=VF
CAST_TIME
=1.0
RESOURCES
=i_reag_black_pearl
RUNE_ITEM
=i_rune_fireball
SCROLL_ITEM
=i_scroll_fireball
FLAGS
SPELLFLAG_DISABLED
EFFECT_ID
=i_fx_fireball
EFFECT
=8,16
DURATION
=0.0
MANAUSE
=9
SKILLREQ
=MAGERY 30.0
INTERRUPT
=100.0,100.0
ON
=@Effect
   LOCAL
.DAMAGETYPE=(<DEF.dam_fire>|<DEF.dam_magic>) 

Remember that flags are combinable by using the | operator.
So you can add the flag SPELLFLAG_DISABLE in this way:
PHP Code:
FLAGS=spellflag_dir_anim|spellflag_targ_obj|spellflag_harm|spellflag_damage|spellflag_fx_bolt|spellflag_resist|spellflag_disable 
(This post was last modified: 06-19-2015 07:42 PM by darksun84.)
06-19-2015 07:34 PM
Find all posts by this user Like Post Quote this message in a reply
mtprimo
Apprentice
*

Posts: 3
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Jun 2015
Reputation: 0



Post: #3
RE: Custom player given name and more
Thanks for the spell advice.

About the name system, i was thinking in something more open than that.
The name a player choose in the character creation will be useless, it won't be used anyway
If you use the command and target a player, it'll ask which name you knows him for, you enter, and it only appears what you wrote, and only for you. That would only edit a comment that appears when passing the mouse by a player with an "Unknown".
My initial idea would only to exchange this Unknown to whatever the player wishes, but the first problem i stopped on was with the journal showing ": wrote something".

But yea i think its probably the people roleplay that themselves. But damn this idea doenst get of my mind.
06-20-2015 04:17 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #4
RE: Custom player given name and more
The most optimal way you have to do so is to edit packets with the packet handler: http://ruosi.org/packetguide/index.xml#both98

Packet 11 (player information), 98 (all names macro), 1c (text sent, this is for journal), 6f (trade windows), 74 (shop list), 9e (shop sell), AE (unicode text, journal too), C1 and CC (localized message). There are some more but not really important (the ones for bulletin boards, mahjong...)

IMO the work related to this exceeds a lot what it worths ...
06-20-2015 07:27 AM
Find all posts by this user Like Post Quote this message in a reply
mtprimo
Apprentice
*

Posts: 3
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Jun 2015
Reputation: 0



Post: #5
RE: Custom player given name and more
Yea i see, looks pretty messed up to work with. Thanks for the tips thou!

And for the last question i got it on today running a stress test with some people: perma-death.

Since my shard uses a custom map, there is no ressurection ankh or any healer, so the character really keeps wandering in the "limbo". Thats the easy way to do it, but i've been wondering if someone would have any idea regarding this and, since i'm the only one who knows a little tiny bit of scripting in the shard i wouldnt have much of help with the people in the shard, only the ideas, but you guys who are experienced and have plenty more time than me on sphere scripting can have something on this. I would like to hear it and learn a bit more.

Thanks in advance.
(This post was last modified: 06-20-2015 03:24 PM by mtprimo.)
06-20-2015 03:18 PM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #6
RE: Custom player given name and more
If i remember well, all kind of resurrection are handled by the resurrection spell, so adding return 1 in the @effect trigger of this spell should block any resurrection attempt.
06-23-2015 02:14 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)