Page 1 of 1

CODE: ./share/settings setting for allowing item destruction

Posted: Sun Dec 07, 2003 3:15 am
by Stwong
crossfire = cvs copy
crossfire-dev = my modified copy

diff in settings file should explain it all, but, in a nutshell, this patch lets server admins change whether items can be burned or turned into icecubes. For some players, this can be interesting, for others, merely annoying, so they should be allowed to choose, imo :) enjoy the code
diff wrote:$ diff ./crossfire-dev/server/attack.c ./crossfire/server/attack.c
127c127
<
---
>
141,143c141
< {
< if (settings.destroy_items == FALSE)
< return;
---
> {
diff wrote:$ diff ./crossfire-dev/server/init.c ./crossfire/server/init.c
577,593c577,584
< } else if (!strcasecmp(buf,"simple_exp")) {
< if (!strcasecmp(cp,"on") || !strcasecmp(cp,"true")) {
< settings.simple_exp=TRUE;
< } else if (!strcasecmp(cp,"off") || !strcasecmp(cp,"false")) {
< settings.simple_exp=FALSE;
< } else {
< LOG(llevError,"load_settings: Unkown value for simple_exp: %s\n",
< cp);
< }
< } else if (!strcasecmp(buf,"destroy_items")) {
< if (!strcasecmp(cp,"on") || !strcasecmp(cp,"true")) {
< settings.destroy_items=TRUE;
< } else if (!strcasecmp(cp,"off") || !strcasecmp(cp,"false")) {
< settings.destroy_items=FALSE;
< } else {
< LOG(llevError,"load_settings: Unkown value for simple_exp: %s\n",
< cp);
---
> } else if (!strcasecmp(buf,"simple_exp")) {
> if (!strcasecmp(cp,"on") || !strcasecmp(cp,"true")) {
> settings.simple_exp=TRUE;
> } else if (!strcasecmp(cp,"off") || !strcasecmp(cp,"false")) {
> settings.simple_exp=FALSE;
> } else {
> LOG(llevError,"load_settings: Unkown value for simple_exp: %s\n",
> cp);
diff wrote:$ diff ./crossfire-dev/include/config.h ./crossfire/include/config.h
135,136c135
< #define SET_FRIENDLY_FIRE 5
< #define DESTROY_ITEMS FALSE
---
> #define SET_FRIENDLY_FIRE 5
diff wrote:$ diff ./crossfire-dev/lib/settings ./crossfire/lib/settings
156d155
< #spellpoint_level_depend false
205,211d203
<
< # This option enables the destruction of items with spells if on. This option
< # can cause the destruction of key items, forcing someone to redo a map if they
< # accidentally destroy a quest item or the likes. Set to true by default within
< # code.
<
< destroy_items false

Posted: Sun Dec 07, 2003 8:27 am
by Ryo
Seems to me your patch is reverted....

Also, items can be destroyed already. Just burning hands'em, enough to destroy.
Note that some items, including usually special quest items, can NOT be destroyed. This is precisely to avoid having to wait for a map reset.

As for icecubes, i think (but this would have to be checked) by changing the material you could prevent freezing/destroying.

Last but not least, i think the best place to post patches is the crossfire-devel mailing list. Many people on the list don't read forums here.

Posted: Sun Dec 07, 2003 3:58 pm
by Stwong
As for changing the materials--a lot of people downloading the server just want to play singleplayer and dont really want to edit every quest item to not burn/turn into an icecube... And I've already burnt 3 items from scorn royalty quest, my sister has burnt one of the 3 oldcity keys, and my brother managed to burn a strange key he needed to continue. I just shutdown the server and restarted, but some people don't really know the dm commands that well. As for mailing list / forum issue, I'll discuss that in the devel forum thread...

Posted: Mon Dec 15, 2003 4:13 pm
by gahel
Ryo wrote: Note that some items, including usually special quest items, can NOT be destroyed.
Not sure if that's fixed but special quest items can be destroyed using the alchemy spell.

Posted: Mon Dec 15, 2003 4:14 pm
by gahel
Ryo wrote: Note that some items, including usually special quest items, can NOT be destroyed.
Not sure if that's fixed but special quest items can be destroyed using the alchemy spell.

Posted: Tue Dec 30, 2003 4:21 pm
by Leaf
Stwong wrote: I just shutdown the server and restarted, but some people don't really know the dm commands that well.
That works, but there is an easier way IMO.

Use the map reset command with DM access

http://crossfire.real-time.com/commands ... html#reset

Remember to use the 'who command to find on what map(s) need to be reset first.

just remember all the maps you will break with this patch...

Posted: Wed Dec 31, 2003 6:50 pm
by Avion
One thing about this patch if you use it - you will break a lot of maps. Sorry to be a buzz killer, but that's the way it works - a lot of maps rely on destroying objects to function properly. If you disable game functionality in this way - don't expect things to work properly.