Page 1 of 1

Server updates applied, 25-July-2005

Posted: Tue Jul 26, 2005 2:35 am
by Leaf
Numerous updates are now in place on the server.

Think of the current state/version as a release candidate with a tentative date of 7-days from now.

Details on the changes will be posted here as they become available.

Posted: Wed Jul 27, 2005 12:40 am
by Leaf
List of changes.
"Simple" summary of in game changes to be added as/when time allows.

Full details:
http://crossfire.real-time.com/cvs/stat ... index.html

server/skill_util.c: don't try to send a message if monster killed/removed.

socket/init.c: settings values to 0 before using'em works better, usually ^_-

random_maps/random_map.h: Add prototype for set_random_map_variable().
server/main.c: Remove prototype for set_random_map_variable().
lib/Makefile.am, lib/Makefile.in, lib/help/whereabouts: Add help for whereabouts command.
server/apply.c: Properly terminate destination string with '\0' in apply_item_transformer(). Avoid clearing the string buffer multiple times.

doc/Developers/item_transformation: fixed documentation.
server/apply.c: remove incorrect comment. Item transformer uses food for max use.
Replaced some hardcoded values with define. Modified files:
common/arch.c
include/object.h
plugin/plugin_python.c
server/apply.c attack.c build_map.c spell_attack.c spell_effect.c time.c

include/win32.h: add PLUGIN_SUFFIX definition.

server/plugins.c: Merge mostly identical code from #ifdef WIN32 and #else blocks. Use opendir/readdir/closedir instead scandir for Unix because WIN32 probably does not have these functions. Prevent loading one plugin multiple times.
include/sproto.h: Update prototypes for plugin functions.
server/c_wiz.c: Add success/failure messages to plugin and plugout commands.
Do not crash due to missing parameter.

server/pets: Fix off-by-one error in follow_owner().
server/c_wiz: Allow the summon and teleport commands to place the summoned player/DM north-west of DM/player.

Use const char* instead of char* when possible. Remove unused variables in weather code.
Affected files:
common/map.c region.c utils.c
crossedit/stubs.c
include/funcpoint.h libproto.h sproto.h
random_maps/standalone.c
server/weather.c

server/apply.c: Make converters that increase value non-functional.

server/{monster.c, pets.c}: Fixed bug in previous commit of arena petmode that cause pets that should be friendly to eachother to fight.

common/{map.c, readable.c, treasure.c},
crossedit/{Attr.c, png.c, Cnv/{CnvFiles.c, CnvPath.c}},
plugin_animator/plugin_animator.c,
plugin_logger/maps.c,
server/{alchemy.c, c_misc.c, c_wiz.c, init.c, main.c, monster.c, pets.c,
player.c, resurrection.c, rune.c, skills.c, spell_effect.c, time.c,
weather.c}:
Fix spelling errors in string constants.
server/c_misc.c: Remove superfluous trailing '\0' from strings.

server/{c_misc.c, monster.c, pets.c}, include/player.h: Add new "arena" petmode which allows pets to attack players and other pets while in the arena.

*Makefile.in, aclocal.m4, configure: Rebuilt generated files.
lib/Makefile.am: Update list of help files to install.
server/skills.c: Do not reveal a hidden DM in attempt_jump().
server/skills.c: Do not reveal a hidden DM in steal().
server/player.c: Ignore hidden DM in stand_near_hostile(). Formerly it always returned false if a hidden DM was present.

server/c_object.c: Improved pickup. You can now do pickup +bow, or pickup -shield. Much simpler then fiddling with sums of 2^x values.

server/c_party.c: Make party passwords with a length of 8 characters work again.
lib/artifacts: Fix type of lockpicks of quality/high quality.

Those commits remove the dependency on the plugin towards the library. All functions used from the plugin are hooked, instead of being called directly. This fixes bugs under Windows, and simplifies compilation. Also, many new callbacks were defined.
Affected files:
include/plugin.h plugproto.h sproto.h
plugin/plugin_python.c
server/plugins.c
Note that at some point some functions could be moved out of plugin_python and put in plugin_general to be shared between different plugins.

Those commits remove the whole "glue/callback" logic. Instead functions are just defined as external, and should be implemented (even as dummy) by all programs.
Affected files:
common/arch.c button.c glue.c init.c item.c living.c logger.c los.c map.c object.c
time.c treasure.c
crossedit/stubs.c: new file with dummy functions.
crossedit/Makefile.[in|am]: add this new file.
include/funcpoint.h libproto.h sproto.h
random_maps/standalone.c: add dummy functions for those externals.
server/init.c: remove obsolete setup_library()

Added a wrapper function for check_trigger from plugins.
include/plugin.h: new function
server/plugins.c: wrapper for check_trigger.

plugin/plugin_python.c: (add|free)_string should *not* be called directly under Win32. Therefore let's use the hooks. Also, when removing an object, better check it's not the current object (CFPython.RemoveObject(CFPython.WhoAmI()) anyone?).

server/spell_util.c: use on_same_map instead of checking directly map pointers.

Those changes implement a quest tracking system. Check the doc/quests document for more info.
common/quest.c: new file with a few quests-related functions.
doc/Developers/mapguide: point to quests file for instructions on quests.
doc/Developers/quests: new file with instructions on how to use quests, and mplementation details.
doc/Developers/README: added quests file.
include/libproto.h: new functions in quest.c.
include/quest.h: new file with a few defines for quests.
include/sproto.h: new function command_quest, update talk_to_wall definition.
lib/help/quests: new help file for quests command.
server/c_misc: new command_quests function.
server/commands.c: link command_quests to "quests".
server/monster.c: update talk_to_wall and talk_to_npc to check for quests.
server/time.c: modify marker behaviour to handle quests.

common/{button.c, treasure.c, utils.c}, server/{c_wiz.c, login.c, shop.c, skill_util.c, spell_effect.c}, socket/{image.c, item.c}: Fix printf like format specifiers. At least one of them fixes a means to crash the server.

Those changes introduce party spells. Casted spell should be defined through 'other_arch' field. Note that this needs through testing to make sure it works as intended.
include/spells.h: new spell type, 'party spell'.
server/spell_util.c: new spell type, party spell.

server/{login.c, player.c}: Fix buffer overflow with pl->title. Based on patch by Scott Kullberg.
crossedit/{Edit.c, Cnv/CnvPrompt.c}, server/{ban.c, hiscore.c, login.c,
player.c, shop.c, win32.c}: Properly terminate destination string of strncpy with '\0'.
server/init.c: Fix error message.

configure.ac, configure, aclocal.m4, Makefile.in: Add AM_MAINTAINER_MODE macro to configure.ac - this should hopefully supress auto regeneration of makefiles.in

Add a --with-python option to configure. Also, update the python detection script to check for 2.5 (not out yet, but might as well be prepared.) Will try to commit files in proper order so that dependency checking is correct and it won't try to rebuild makefiles or other files.
--
acinclude: Updated checks for --with-python
aclocal.m4: updated
configure.ac,configure: Updated checks for --with-python
config.sub, config.guess - update to latest versions
INSTALL: Updated build directions

lib/Makefile.am, lib/Makefile.in: Remove map_check from normal distribution due to different license on file.
random_maps/monster.c: Reduce monster density on random maps - take into account size of monsters when calculating density.
utils/metaserver.pl.in: At a timeout value that limits how often clients can ask for metaserver info.

lib/settings: Turn of fastclock as default option.
socket/loop.c: Change behaviour of metaserver/flushmaps/watchdog calls if fastclock is set - don't do those any faster than normal.

Server can now be used as a Windows server, with command-line options -regsrv (register server and exit), -unregsrv (unregister server and exit) and -srv (should not be used directly, for the service control manager call).
server/init.c: add command-line options.
server/main.c: loop is no more infinite under Windows. Save and clean after it, too.
server/win32.c: add service routines.

common/living.c: Print correct message when (un-)wearing items with negative luck.

include/living.h: Patch from Kari Pahula to remove obsolete variable declarations.

server/skill_util.c: Print correct permanent experience ratio for experience values >2 billion.

server/apply.c: Do not unlock LAMP items when turning them on or off.
server/apply.c: Fix CONVERTER items with slaying "money" to trigger for MONEY iitems only.
server/player.c: Generate proper plural name for player's gravestones.

Ensure that object->msg always has a trailing \n character. This is necessary to prevent corrupted map files.
plugin/plugin_python.c: Add trailing \n to message set by CFPython.SetMessage() if not already present.
server/plugins.c: Add trailing \n to message set by HOOK_TELEPORTOBJECT if not already present.
server/rune.c: Add trailing \n to rune messages.

Apply qal21's patch [ #1205421 ]: Implement new Python functions: GetArchType, GetFacing, GetLevel.
plugin/plugin_python.c, plugin/include/plugin_python.h: Add new functions.
doc/Developers/python: Describe new functions.

server/monster.c: Fix monsters to cast spells from spellbooks.

Fixed compilation issue.
server/apply.c: can't declare a variable after some function call.
socket/info.c: removed unused variable.

Corrected code to compile under -ansi gcc flag:
* correction of some non posix compatible calls around scandir
* changing configure to detect the absence of 'alphasort' prototype
* converted some '//' comment to /**/ one
* reran automake1.8/autoconf2.50/autheader2.50
Note even it it compiles with -ansi -pedantic, it still need cleanup to get 64 bits experience code working!

Applied Casper1's patch [ #1193516 ] for Hurd support.
* socket/lowlevel.c: #ifdef some code part that won't work.
Change some char* to const char*, when values shouldn't be changed. Changed files:
* include/libproto.h
* common/arch.c
* common/living.c

Change some char* to const char*, when values shouldn't be changed. Changed files:
* include/sproto.h
* socket/info.c
* socket/item.c

Change some char* to const char*, when values shouldn't be changed. Changed files:
* include/sproto.h
* server/apply.c
* server/ban.c
* server/spell_util.c

server/skills.c: Change it so that jeweler skill is used to identify amulets, not alchemy skill.

Apply patch 1190107 so server compiles on HURD.
common/porting.c: Add define for MAXPATHLEN
socket/init.c: Add check for __GNU__ for setsockopt()

Change to have objects generated by creator properly fixed up (material, for potions, spell object, etc).
---
common/treasure.c: add GT_MINIMAL flag to change_treasure() to do minimal processing for objects created.
include/treasure.h: Add GT_MINIMAL define.
server/apply.c: Add call to fix_generated_item() in convert_item()

Various minor bugfixes.
common/los.c: Patch to fix negative lighting. Use isqrt instead of sqrt, so we only want integer values anyways.
include/libproto.h, include/sproto.h: Rebuilt as there were some improperly matching prototypes.
random_maps/rogue_layout.c: Replace sqrt with isqrt calls.
server/c_misc.c: Make name_cmp() a static declaration so it won't be put in the sproto.h file.
server/init.c: Remove /* within comment string.
server/monster.c: Change sqrt to isqrt

Those changes are just changing char* to const char* in some function prototypes.
Affected files:
common/recipe.c
common/region.c
common/treasure.c
common/utils.c
include/libproto.h: match headers.
server/main.c

Those changes add the ability to transform items through 'item_transformer' (163)-type items See doc/Developers/item_transformation for more info.
common/item.c: don't display 'slaying' field for food.
include/define.h: add new 'ITEM_TRANSFORMER' type.
include/sproto.h: add new function 'apply_item_transformer'.
server/apply.c: new 'apply_item_transformer' function to handle that item type.

common/map.c: map pathnames are now const char*, no reason for something else.
common/region.c: remove unused variable.
include/libproto.h: update functions definitions.
include/sproto.h: weathermap_to_worldmap_corner now returns a const char*.
include/win32.h: define missing NAME_MAX as MAX_BUF.
server/c_misc.c: remove unused variable. Use const char* when possible.
server/weather.c: weathermap_to_worldmap_corner now uses const char* as return type.

Random map code improvements - add support for subdirectories in the style maps for random maps. Add difficulty_increase parameter for random maps to control how fast they get harder.
doc/Developers/random-maps: Add notes about difficulty_increase parameter.
random_maps/Makefile.am: Update proto directive to use cproto, not cextract.
random_maps/random_map.c: Update to use difficulty_increase when figuring difficulty of maps. Add code to save it in list of parameters.
random_maps/random_map.h: Add difficulty_increase field to structure.
random_maps/reader.l, reader.c: Add code to find difficulty_increase parameter.
random_maps/rproto.h: rebuilt.
random_maps/special.c: Pass in difficulty increase to write_parameters_to_string()
random_maps/style.c: Remove old scandir - replaced by our own load_dir() - necessary because we need to check type of files, which scandir doesn't easily let us do. Since it is now our own routine, just return array of file names instead of dirent structures.

utils/Makefile.am: Add cfmeta-rrd to list of files to add to distributions
utils/cfmeta-rrd: Example of sample script that takes data and stores it into rrd file and draws graphs (new file).
utils/metaserver.pl.in: Add recording of useful stats to external file so they can be processed by other external scripts.

server/shop.c: Pass in player object to pay_from_container() - code was trying to deref pouch->contr which was null. Only occurs when player has 2 different money objects of the same type, but 2 crashes observed on metalforge.

Posted: Sat Jul 30, 2005 10:05 pm
by Leaf
Summary of what players can see or expect with the recent changes.

Pets can now battle one another and other players when in arena maps. Use the command 'petmode arena to active this

You can now do pickup +bow, or pickup -shield. Much simpler then fiddling with sums of 2^x values.

Fix monsters to cast spells from spellbooks, if the monster has the spellbook in their inventory, they can also cast that spell.

Change it so that jeweler skill is used to identify amulets, not alchemy skill.

Decreased monster density on randomly generated maps.