Changes from Chuckles Space to Portable Space Engine v0.5:
----------------------------------------------------------
- Some bug fixes and code improvements.
- Attribute names have been made more readable.
- Templates are now stored in the database as ship object parent as ship object parents. Ship objects now contain all relevant ship information.
- Both ST_DOCKED_AT and ST_STARTPOS are written when a ship docks.
Changes from v0.5 to v0.7
-------------------------
- Huge changes to the way space objects are designed. Much is now possible!
- Planet transporter range now taken from CF_XPORT_RANGE.
- Starbase rotation is now handled through the softcoded heading attributes
(see the building guide).
- Ships no longer turn instantaneously.
- Watches, autopilot, and sensor nets have been removed. In a later version
they may be added back into the engine in some form. If you need these
features, it should be possible to softcode them.
- Ships can now dock with anything with a docking bay, provided that they
aren't too big.
- Photons can now have customized names, set in CF_TORP_NAME.
- The number of spaces is now only limited by SPACE_LIMIT. Everything above
0 is a sim space.
- Communications console *greatly* simplified. A new communications engine
will appear sometime in the 0.9 series.
- The SPACE flag no longer needs to be set on space objects, only objects that
use spacecall().
Patch v0.7.1
------------
- Many bugs fixed.
- "Door size" added to spec listing.
- Added CAN_MOVE flag, to speed up the handling of immobile objects.
Patch v0.7.2
------------
- Fixed several bugs and cleaned up some code.
- Added flags: PLANET, MAN_DIR, CAN_LAND
- Removed flags: CAN_LAND_ON, MAN_SPEED, MAN_HEADING
- Added landing and orbiting support.
- Added has_obj_flag, has_ship_flag, rel_pos syscalls. Renamed nav_bearing to
pos; now returns cartesian coordinates.
- CONTACT_INFO_STRING can now appear on any object. If it is blank, the
object name will be used.
Patch v0.7.3
------------
- Fixed several bugs while working on the engine's manual.
Patch v0.7.4
------------
- Bugs fixed, some code cleaned up.
- Added support for transporters.
- Added lock_space spacecall.
- Added list_containers function. This lists the dbrefs of the objects whose
critical ranges the caller is in. Useful for reporting such things as
"The ship is currently in an asteroid belt."
- Fixed a bug with huge objects sensing themselves. Huge objects can now
be invisible, but not hazy or cloaked. (These flags have no effect.)
- Added EV_ORBITING, EV_ORBITED, EV_ORBITING_OTHER.
- Added delayed cloak.
- CF_DOOR_STATUS added for consistency with CF_CLOAK_STATUS. HAS_DOORS flag
has been removed.
- Added support for multiple torp reloaders. This is set with
CF_TORP_RELOADERS.
Patch v0.7.5
------------
- Fixed a few bugs.
- Added new EXPERIMENTAL torpedo code! helm_fire_torp spacecall has been
modified to helm_fire_torp(torp #, bearing, +/-, elevation). If not firing
with specified bearing/elevation, "NONE" should appear as the second argument.
Patch v0.7.6
------------
- Logging now only occurs in real space.
- Added area-effect damage spacecall explosion(space, x, y, z, base damage).
- Event EV_TAKE_DAMAGE modified. Second argument is now the type of damage.
0 = gun, 1 = torp, 2 = explosion. It no longer passes the shooter's
identity (use EV_ATTACKED for that).
- New event EV_INT_EXPLOSION, triggered when an explosion occurs within the
critical range. Argument is the amount of damage.
- EV_LOW_POWER is now triggered when reactor output drops below 5% of max (no
arguments).
- Added drain_reactor syscall, which drains a given amount of power from the
reactor. EV_REACTOR_DRAIN is triggered on the ship when this happens (no
arguments).
- Added EXPERIMENTAL tractor beam system!
- Both transporters and tractor beams can now be damaged.
- Fixed a really annoying rounding error which caused ships not to move at
warp 1.0. Apparently this plagued TNG for a while.
Patch v0.7.7
------------
- Many bugs fixed.
- Dock's facing shield must be lowered before ship can dock.
Patch v0.7.8
------------
- A couple bugs fixed.
- The function name "spacecall" has been changed to "sc".
- Specs has been updated. Some OOC information is now left out of the eng
specs display, and the ship class, type, etc. is consolidated onto one line.
- Pacifist flag now prevents weapons from being charged.
- Torp explosions are now half as powerful, and shields are now much, much more
effective at resisting explosion damage.
Changes from v0.7.8 to v0.8.0 (First Public release)
----------------------------------------------------
- Updated to work with TinyMUX v1.4p5.
- Fixed a large number of bugs.
- Changed the explosion event to include the distance from the explosion.
- Changed the source code layout and spacecall names to remove references to
the old TOS console names. eg. helm has been changed to tactical, nav has
been broken into navigation and shields. Renamed helm.* to tactical.*, and
created shields.c and shields.h.
- Changed EV_SCANNED to INFO_SCAN_STRING. Moved the code for displaying
contacts and scanning to sensors.c from events.c.
- Added contact_info_level spacecall, EV_TORPS_LOADED, EV_TORPS_ARMED, and
EV_GUNS_CHARGED.
- Added CF_DOOR_SIDE. Indicates the side of the ship the docking bay door
is on (if any). Shield on that side must be lowered for ships to undock.
- Ships that undock, or launch now automatically start at the coordinates of the
object they departed from (neglecting ST_STARTPOS).
- Added getDebugCharacter() and isGoodObject() to predicates.c to replace the
DebugCharacter and Good_obj macros.
- Added event EV_COMM_RECEIVED.
- Added bay door info to scan. Added event EV_BAY_DOORS.
- ST_DOCKED_AT is no longer cleared on launch or undock. If you still want it
to be, have EV_LAUNCHED or EV_UNDOCKED clear it.
- Added spacecall set_pos.
Patch v0.8.1
------------
- Fixed sensor bug affecting huge objects.
- Added torpedo counter. Ships can now carry a limited number of torpedoes.
Added spacecalls tac_torp_ammo (function), and set_torp_ammo (command).
- Added event: EV_SHUTDOWN.
- Added flag: CAN_BEAM_FROM.
Patch v0.8.2
------------
- A damage check is no longer done if all phasers fired miss.
- Changed the definition SPACE_LIMIT to NUM_SPACES, for clarity.
- Fixed check for valid space number in commands.c (Mark Cooke).
- Fixed bug that occurred when sensors are damaged.
Patch v0.8.3
------------
- The engine now supports TinyMUSH 2.2.3!
- Removed the crystal system (a Trek-ism). Engine stress damage now
affects the engine/reactor directly.
- Ships can now dock, land, or orbit while moving.
- A log entry is now created when a ship is destroyed due to catastrophic
engine failure.
- cause_damage now logs the correct type of damage that was caused.
Patch S70909
------------
- Ships now carry an odometer, which tracks the distance the ship moves
in space. It is incremented by one tenth the actual distance if the
ship is being tractored. Two new spacecalls, nav_odometer, and
nav_odometer_set, and a new ship attribute, ST_ODOMETER are used to
manipulate the value.
- The length of time a ship has been in space is tracked, and can be
read using the new nav_time_active, and nav_time_active_set spacecalls.
When the ship is not active, the time is stored in the ST_TIME_ACTIVE
ship attribute.
Patch S70912
------------
- New object destruction code to prevent races when freeing objects.
Strategy now sets a REMOVED flag, and the Removed() function is
added to places that check for removed/inactive objects and which
scan the currently active list. Objects flagged as REMOVED are
freed in the space_update loop.
- The ship is destroyed when it's engine is destroyed through stress.
- Destruction of ships by engine stress is logged if the ship is in
space 0.
- Modularization of the system damage code into separate routines in
preparation for a new 'cause_system_damage' spacecall later.
- Addition of 'short_contact_list' and 'contact_info_string' functions
to provide a short sensor report, and a softcode friendly call to
retrieve sensor information.
Patch S70914
------------
- Added CF_RANGE_FACTOR and CF_RANGE_NAME to all space objects. These are
used by the hardcode whenever distance are needed to be output to the
players. The actual internal distance is multiplied by CF_RANGE_FACTOR,
and some of the display outputs have been changed to append the contents
of CF_RANGE_NAME to the displays to give an indication of the units in use
by the object. All internal coordinates are unchanged.
- Updated structures and procedures to use range_t and coord_t instead of
hardcoding them as integers. Also added RANGEF and COORDF defines to
remove some of the type dependancy in hardcoded formatting.
Patch S70921
------------
- Added an option to allow the space designer to override the engine
generated messages by using EV_* calls. If the EV_* call evaluates to 0
then the engine emits the standard message (so that untrapped EV_*'s still
produce output). If it evaluates to something other than 0, then the
engine generated message is suppressed. NOTE: The result of the EV_* call
is passed straight into atoi(). Thus, any non-numeric result will be treated
as 0.
For example:
EV_LOCKED_ON: 1[pemit(%1,Attempting to lock weapons...)]
[pemit(get(%2/UserDBREF),strcat(ansi(hr,Warning:),ifelse(%0,contact %0 has
locked weapons.,An unknown contact has locked weapons.)))]
These overrides will be making a progressive appearance, so there aren't
many there yet.
- Fix cloaking so that you can't raise shields when you are cloaked.
- Added dorsal and ventral shields, and a new constant, NUM_SHIELDS. This is
used to reduce the work required to change the number of shields - though the
code is *not* able to have this defined at will without hard code changes to
the facing shield calculation code, and a number of the console messages.
NOTE: This change is *NOT* #ifdef'd so there is *no* option in spaceconf.h
to turn it off. You will need to fix softcode calls to shd_allocate to take
6 parameters now (CMD_QALLOC/CMD_SALLOC), and FUN_NSTATUS, FUN_SHIELD_NUM,
and probably some others. You will also need to clear all ST_SYSTEM_DAMAGE
flags from space objects when they are not active, as there are two new
shields, and it caused the offsets to the systems to change.
CMD_SALLOC:
$sal * * * * * *:think sc(shd_allocate,%0,%1,%2,%3,%4,%5)
CMD_QALLOC:
$sal:think [setq(0,div(sc(eng_alloc_shields),6))][sc(shd_allocate,%q0,%q0,%q0
,%q0,%q0,%q0)]
FUN_SHIELD_NUM:
[switch(%0,fore,0,aft,1,port,2,starboard,3,dorsal,4,ventral,5)]
FUN_NSTATUS:
[setq(0,u(FUN_POSITION))][setq(1,sc(nav_heading))]Position([extract(%q0,1,1)]):
%b%bbearing:%b%b[extract(%q0,2,1)]%b%b%belevation:%b%b[extract(%q0,3,1)]%b%b%br
ange:%b%b[extract(%q0,4,1)]%rOrientation:%b%b%b%bheading:%b%b[extract(%q1,1,1)]
%b%b%belevation:%b%b[extract(%q1,2,1)]%b%b%bwarp:%b%b[sc(nav_speed)]%r%rShield
status:%r%b%bFore:[rjust(sc(shd_shield_level,0),5)][space(4)]Aft:[rjust(sc(shd_
shield_level,1),5)][space(3)]Port:[rjust(sc(shd_shield_level,2),5)][space(2)]St
brd:[rjust(sc(shd_shield_level,3),5)][space(3)]Drsl:[rjust(sc(shd_shield_level,
4),5)][space(2)]Vntrl:[rjust(sc(shd_shield_level,5),5)]%r%b[u(FUN_SHIELD_STATUS
,0)]:[u(FUN_SHIELD_ACTION,0)]%b%b[u(FUN_SHIELD_STATUS,1)]:[u(FUN_SHIELD_ACTION,
1)]%b%b[u(FUN_SHIELD_STATUS,2)]:[u(FUN_SHIELD_ACTION,2)]%b%b[u(FUN_SHIELD_STATU
S,3)]:[u(FUN_SHIELD_ACTION,3)]%b%b[u(FUN_SHIELD_STATUS,4)]:[u(FUN_SHIELD_ACTION
,4)]%b%b[u(FUN_SHIELD_STATUS,5)]:[u(FUN_SHIELD_ACTION,5)]%r%r[switch(sc(nav_doo
r_status),OPEN,The docking bay doors are open.%r,CLOSED,The docking bay doors
are closed.%r)][switch(sc(shd_cloak_status),ON,The cloaking device is
engaged.%r,OFF,The cloaking device is offline.%r,CLOAKING,The cloaking device
is engaging.%r,DECLOAKING,The cloaking device is disengaging.%r)]%rAvailable
warp power: [sc(eng_alloc_nav)]%rAvailable shield power:
[sc(eng_alloc_shields)]%rShield
Allocations:%b%bfore:[rjust(sc(shd_alloc_shield,0),4)]%b%baft:[rjust(sc(shd_all
oc_shield,1),4)]%b%bport:[rjust(sc(shd_alloc_shield,2),4)]%b%bstbrd:[rjust(
sc(shd_alloc_shield,3),4)]%b%bdrsl:[rjust(sc(shd_alloc_shield,4),4)]%b%bvntrl:[
rjust(sc(shd_alloc_shield,5),4)]
- New diagram for showing the coordinate scheme used by the engine.
Patch S71024
------------
- Updated damage code to add a cause_system_damage call. Parameters are an int
specifying the system to damage, and the number of points of damage to do
to it).
Ie: cause_system_damage(int system, int points)
- Added system_damage.html to the documentation to show how points of damage
translate into performance changes of the various systems.
- Fixed CF_DOCK_SIDE to allow dorsal and ventral shields to be specified, and
updated the ship attribute documentation.
- Installed code to correct status calculation of shields (reported By Dareon).
Now, shield status is shown with the following priority:
STABLE < CHARGING/FALLING < OVERLOADED.
This changes the previous priority, when overloaded was below charging or
falling. This was done in preparation of adding an EV_SHIELD_OVERLOADED
callback, which the space designer can use to modify the shield status if
they're overloaded too long (for instance).
- Added code to allow flexible shield choices to be made on a per ship basis.
The options are set in the new CF_SHIELD_CONFIG parameter, and more info is
in the HTML help files. Note that some fairly major changes are needed to
FUN_NSTATUS, CMD_QALLOC and CMD_SALLOC to use these features. Examples:
FUN_NSTATUS:
[setq(0,u(FUN_POSITION))][setq(1,sc(nav_heading))]Position([extract(%q0,1,1)]):
%b%bbearing:%b%b[extract(%q0,2,1)]%b%b%belevation:%b%b[extract(%q0,3,1)]%b%b%br
ange:%b%b[extract(%q0,4,1)]%rOrientation:%b%b%b%bheading:%b%b[extract(%q1,1,1)]
%b%b%belevation:%b%b[extract(%q1,2,1)]%b%b%bwarp:%b%b[sc(nav_speed)]%r%rShield
status:%r%b[iter(setr(2,lnum(sc(shd_number))),strcat(rjust(sc(shd_short_name,##
),5):,rjust(sc(shd_shield_level,##),5)%b))]%r%b[iter(%q2,strcat(rjust(U(FUN_SHI
ELD_STATUS,##),5):,U(FUN_SHIELD_ACTION,##)%b))]%r%r[switch(sc(nav_door_status),
OPEN,The docking bay doors are open.%r,CLOSED,The docking bay doors are
closed.%r)][switch(sc(shd_cloak_status),ON,The cloaking device is
engaged.%r,OFF,The cloaking device is offline.%r,CLOAKING,The cloaking device
is engaging.%r,DECLOAKING,The cloaking device is disengaging.%r)]%rAvailable
warp power: [sc(eng_alloc_nav)]%rAvailable shield power:
[sc(eng_alloc_shields)]%rShield
Allocations:%r%b[iter(%q2,strcat(rjust(sc(shd_short_name,##),5):,rjust(sc(shd_a
lloc_shield,##),5)))]
CMD_QALLOC:$sal:think
[setq(0,div(sc(eng_alloc_shields),sc(shd_number)))][sc(shd_allocate,%q0,%q0,%q0
,%q0,%q0,%q0)]
CMD_SALLOC [#3]: $sal * * * * * *:think
ifelse(eq(sc(shd_number),6),sc(shd_allocate,%0,%1,%2,%3,%4,%5),pemit(%#,Invalid
command. This ship does not have six shields.))
CMD_SALLOC2 [#3]: $sal * * * *:think
ifelse(eq(sc(shd_number),4),sc(shd_allocate,%0,%1,%2,%3,0,0),pemit(%#,Invalid
command. This ship does not have four shields.))
- Merged in the 0.8.4 changes:
Patch v0.8.4
------------
[Note: This patch is purely a stability release. The entire patch was
contributed by Mark Cooke/Farrell. Thank you for your help in my time of
RL business and PSE inactivity! :) -Mars]
- Accesses to freed space objects is prevented using a delayed freeing
scheme. Prevents possible SEGVs when destroying space objects.
- SEGV when stressing reactors fixed.
- Fix to avoid scanning objects with long descriptions causing SEGVs.
- General fix to platform.c to ensure all buffers handled by the PSE
are SMALL_BUF_SIZE long - unless the code is specifically changed to
use a 'Large' version of the getAttr call. This closes many other
possible SEGV conditions.
Patch S71024
------------
- Prevent the damage code emitting the same message to a player more
than once if they are manning more than one console.
- Prevent the dmg_team_status spacecall from emitting anything if the
ship doesn't have any teams.
Patch S71115
------------
- Add new code to allow a much more flexible method for defining consoles.
Each ship can now have upto 8 consoles, and each console can have any
combination of 'classes'. Eg, a console can be set to receive both
navigation and tactical messages. With ENABLE_MULTI_CONSOLES enabled,
consoles are declared on the space object is a list of dbrefs in the
CF_CONSOLES attribute. On each console, the CF_CONSOLE_TYPES attribute
contains the list of classes that the console receives messages for.
- Added CF_DBREF_BRIDGE and CF_DBREF_ENG for ships. These must be set to the
rooms used for the bridge and for engineering.
- Corrected a problem with the short contact list code when a non-ship object
is in the contact list. This caused a SEGV due to a dereference of a NULL
pointer in the calcFacingShield code. [Reported by Ross V Elia(Chemosh)]
TO USE THIS RELEASE
===================
Add CF_CONSOLE_TYPES on each of your consoles. It can have any combination
of the following options (or the shortest unique abbreviation):
navigation tactical engineering shields transporters communication
On the space object, add the CF_CONSOLE_LIST attribute with a list of all
of your consoles. Remove the CF_DBREF_* attributes.
On the space object, add CF_DBREF_BRIDGE and CF_DBREF_ENG to be the dbref
of the bridge and engineering respectively.
NOTE: The console code update is a major change. Please please please make
sure you have a backup before you try it.
Patch S71116
------------
- Correct a flaw in navLaunch which SEGVs if the object is not correctly
setup, and a 'launch' is attempted.
- Correct a flaw in evLockedOn which will cause a SEGV if more than one
tactical console is setup.
- To remove the discarded 'const' messages when compiling the PSE with
TinyMUX, change the declaration of safe_copy_str in mux/src/externs.h:
extern int FDECL(safe_copy_str, (const char *, char *, char **, int));
and in stringutil.c to:
int safe_copy_str(src, buff, bufp, max)
const char *src;
char *buff, **bufp;
int max;
{
Patch S71117
------------
- Added code in the new notify routine to prevent a player manning more than
one console of a particular type from receiving repeated emits.
- Added a fix to the gun handling code to prevent 'Incoming fire' messages
if the attacker didn't actually fire guns for some reason (such as being
disabled, or out of range, or the gun being broken, etc.).
Patch S71120
------------
- Corrected the torp handling code so that single torps do cause damage if
they hit.
- Updated the gun handling code to call all the EV_ATTACK* event hooks if
guns are fired at a target.
- Corrected a problem in the nav_undock code, where an uninitialized pointer
was used by the new console code.
- Updated the documentation to reflect the new web pages and the withdrawl of
hyper.org
Patch S71121
------------
- Corrected a problem in the nav_undock code, where an uninitialized pointer
was used by the new console code.
Patch S71130
------------
- Added sc(enable_console,console#,enable). This allows the space designer
to reduce the amount of work done when emitting messages to the consoles.
If a console is not manned, it (generally) does not need to be included
in the list of consoles that are emitted to. This can also be used to
simulate console failures.
- Corrected the output from tacGunFire if the target is out of range and the
new range factor code is enabled. The message did not previously take
account of the attacking object's range factor when emitting the error.
- Added functionality for 'roll'. Two new spacecalls were added.
nav_roll() returns the current roll of the ship (0-359).
nav_set_roll(degrees) sets the desired absolute roll (0-359).
A new attribute, CF_ROLL_FACTOR (floating point) is used to set the rate
at which a ship can roll. A rolling ship is a little bit harder to hit
with torps (5% penalty).
- Merged in the 0.8.5 stability fixes:
Patch v0.8.5
------------
- Updates to the gun firing code so that messages are only broadcast when
at least one gun fires. Firing a gun now triggers the EV_ATTACKING_OTHER
broadcast event.
- Updates to the torp firing code so that if a single torp is fired, it
actually does some damage if it hits the target.
- Trying another attribute buffer handling scheme: Added 'MAX_ATTRIBUTE_LEN'
to spaceconf.h. See the comments in that file for more info.
- Fixed a memory leak in getEvalAttr.
- Removed some portions of the 0.9.x series that slipped into 0.8.4.
- Updated patches to the latest development and release versions of TinyMUX.
- Updated documentation to reflect the new sites for PSE distribution.
Patch S71206
------------
- Correct another range factor problem in the explosion notification code.
- Correct the roll code, so that if the roll factor is larger than the
requested roll, the ship does not oscillate.
- Corrected the logged messages about invalid turn and roll factors when
creating new ships. The database object number should now be recorded
properly for ships with invalid settings.
- Added 'Now rolling to .' messages.
- General code cleanup, so that the game can compile with -Wall without
any warnings.
- Fix the torp code so that running out of torpedos disables, rather than
enables auto-loading.
- Fix the evAttacked event to use the right parameters.
- Merged in the 0.8.6 stability fixes:
Patch v0.8.6
------------
- Update the torpedo handling code so that auto-load is correctly disabled
if the vessel runs out of torpedos.
- Correct the evAttacked event to use the correct parameters.
- General code cleanup so that the Portable Space Engine compiles without
any warnings when gcc is set to -Wall.
Patch S71222
------------
- Correction to the shield allocation message, so that the correct power
is emitted when the allocations are changed.
- Updated the navRangeString function used for the short contact list to
work for distances < 1.0 correctly.
- Updated the short contact list code so that it does not cause a crash when
it is called by a planet.
- Some beginnings of 0.9.x features and tidyups. Principally the start of
shield classes, and features from the VArray snapshot.
- Correction to the MFNotify routine to fix a logic error.
Patch S71224
------------
- Correction to the shield naming code to check for non-ship objects before
attempting to dereference the ship data. This corrects a SEGV in the
contact_info_string spacecall.
- Add the format_range_string spacecall to the documentation.
- Updated Makefile to deal correctly with dependency generation.
Patch S80102
------------
- Major updates to the roll handling code to run a little more efficiently,
and to be more consistent with the handling of the MANUAL_DIR flag.
- Efficiency gains by maintaining a unit vector representing the direction
of travel of each object. This will become much more useful when weapon
arcs and the new shield configuration code is installed.
Patch S80309
------------
- Fix to the sph_to_xyz spacecall to account for the range given to the
function. Incorrect operation first reported by Jyranda. Somehow this
bug crept into S70914, and hasn't been noticed since.
- Updated the code to correctly initialize a set of pointers when NUM_SPACES
is defined to by greater than 2 in spaceconf.h
- Added two new spacecalls to allow the name of a particular space to be
changed and readback from softcode. Also added a constant,
MAX_SPACE_NAME_LEN in space.h. The new spacecalls are:
sc(set_space_name, space-number, space-name) : Changes the name
sc(get_space_name, space-number) : Returns the name
- Made the range speedup code part of the core patch set in preparation for
the 0.9 releases.
Patch S80314
------------
- Made the multi-console support part of the core. This REQUIRES the changes
to softcode detailed in the S71115 release notes. Consoles are no longer
fixed to one console of each type. A new attribute on each console defines
the messages types it should receive, and an attribute on the space object
declares the list of console objects.
- Added the code I use to generate the html documentation files to the
archive. Basically a little script to glue a HTML header, the body and a
footer together. It makes changing the style of the pages a little easier.
- Made the navigational roll support part of the code. This allows a
navigator to roll the ship around the fore-aft axis to present different
shields to an attacker. Two new spacecalls provide the necessary support.
nav_roll(): This returns the absolute roll position of the ship. 0 is the
existing setup, where the 'up-down' axis is always 'vertical'.
Positive is clockwise rotation looking along the direction of
travel of the object.
nav_set_roll(int angle): Sets the desired roll from 0 to 359 degrees.
- Updated the move_objects code to handle position and direction separately.
In some cases, it may be desirable to be able to set both manual position
and manual direction flags. This would be useful for simulations in which
inertia is accounted for (such as a newtonian space). The new code also
uses the v_move[] array to move the ship. Basically v_move contains the
unit vector parallel to the direction the ship is travelling in.
- Made the multi-shield code unconditional. Also started to clean up the
code to generalise for any number of shields.
- Made the range factoring code unconditional. Space objects now have two
new attributes, CF_RANGE_FACTOR and CF_RANGE_NAME which control the
units and the relationship to the scale used by space. This lets you
measure in metres, yards, lightyears, parsecs or whatever on a per-space
object level.
- Made the short contact list code part of the core. This adds two new
spacecalls:
short_contact_list(Bool ShowShips, Bool Show Other)
Produces a much compressed version of the contact_list() call.
contact_info_string(int Contact)
Returns the contact information for the specified contact. The string
is of the form: SIZE: VISIBILITY:
BEARING:
HEADING:
FACING: NAME:
- Made the modular damage code part of the core. This adds a new system damage
spacecall, and modularizes the damage code for improved clarity, and easier
enhancement.
cause_system_damage(int system, int points)
Causes the specified number of points damage to the specified system.
- Made the correction to the shield display code. [Bug originally reported
by Dareon]. Status behaviour now is that for any shield the priority of
messages is: STABLE < CHARGING/FALLING < OVERLOADED.
- Made the turn factor code part of the core. A new attribute is available
on each space object - CF_TURN_FACTOR - which has a default value of 1.
It is used when calculating turn rate according to the following formula:
Rate per turn: 90 degrees / (size^2) * CF_TURN_FACTOR
- Made the space_options spacecall part of the core. This function returns
compile time options as a check for the space designer. With this becoming
a core function, I have tidied up the extra emits tagged onto the output
from @version.
- Tidied up the calcFacingShields code a little bit. It should be a little
clearer now.
- Added an extra parameter to the multi-console emit function to allow a dbref
to be specified. The specified object is also emitted to, and so this will
allow messages to be returned to the player performing a command, even if
they are not manning the correct console to receive the message.
- Removed the compact/ansi displays in preparation for 0.9.x, and the new
messaging module.
- Made the 'tidy display' code unconditional. This means that no damage team
status is printed if a ship has no damage control teams.
- Made the events for EV_LOCK_FAILED and EV_UNLOCK part of the core.
Patch S80401
------------
- Added two new calls to retrieve and set the type of a console. This
includes the 'active' pseudo-type. To clear a type, use !. You can
also use !active to disable a console. set_console_types will only
change the flags you specify. Any flags not explicitly set will be
retained. (Feature requested by Jaynin).
set_console_types(console#,string consoles types)
string get_console_types(console#)
IMPORTANT NOTE: You must set a console active for it to receive
messages from the PSE
- Added a new internal function pair - objSystemNameToInt/objSystemIntToName
which will be used to convert between system names and indices. This will
remove much code duplication in the PSE and should soothe future changes
to this mapping.
- Some documentation clarifications.
- Updated the documentation tree to reference the site change and mailing
list change from pc12 to pc24.
- Fixed the damage repair code to remove a conflict between the port shield
and trans'port'ers which lead to ambiguous system messages. (Bug reported
by Jaynin).
Patch v0.9.0
============
- Yes, we finally made it to a v0.9.0 release!
- Moved space information into a structure. This groups together the name,
a flag word, and a pointer to the first object in that space.
- Merged in the event handling code from Cameron. This neatens up the event
code significantly.
- Updated code formatting from Cameron.
Patch v0.9.1
============
- Added PennMUSH support for 1.7.2 patchlevel 8. Very lightly tested on a
Linux glibc (RedHat 5.0) platform.
- Cosmetic repairs to eng allocate, object list, specs, some log messages.
- Modified roll behaviour to mimic turn behaviour. Maximum roll (in one nav
turn) is now 90.0 * roll_factor / size^2. Note that size was not included
before, and existing CF_ROLL_FACTOR settings will need to be revisited.
- Moved roll_factor from the object structure into the ship structure.
- Updated source code formatting in object.h and ship.h.
Patch v0.9.2
============
- Use a hash table for console modes. This should make things a bit quicker
when changing console modes.
- More cosmetic repairs to user-visible output.
- Updated the hashing code to allow lookups to be made on non-zero terminated
strings by providing a string length. This means we don't have to take a
copy of various strings so we could hack them up.
- Added a utility function - load_text_flags - which takes a string, and using
the specified hash table sets or clears flags in a flag word.
- Changed the object, ship and console flag structure to contain a length
parameter. This is used by the new hash search-with-length routine.
- Renamed the console type spacecalls to be more inline with the object and
ship flag calls. I also added a function to directly check a console flag.
set_consoleflags(console, flags)
get_consoleflags(console)
has_console_flag(console, flag)
- Greater use of 'const' and 'static' where possible. This should provide more
opportunities for compiler optimizations, and reduce namespace pollution.
- Corrected the declaration of cmdShdAllocate (was cmdShieldAllocate).
- Fixed funListContainers, funContactListNumbers, funContactListDbrefs,
funTransListBeamable, funTransListDests to use
the platform indepentant buffer return macro. This may very well have
caused tinymush to crash every now and again.
- Rework of platform specific code to remove the MU* headers from
inclusion in any PSE code except platform.c This should give us a
very compact mapping layer between the server and the PSE code.
+-----+ +-----+
| MU* +---- platform.c ----+ PSE +
+-----+ +-----+
- New additional patches to MUX, and MUSH are in the patches directory. This
will cure the errors regarding discarding const when compiling platform.c
patch-tinymux-1.5p3-const
patch-tinymush-2.2.3-const
These patches do not alter the operation of the MUX or MUSH server in any
way. They just add some 'const' declarations where appropriate.
Patch v0.9.3
============
- Updated scanning code so that the scan string returned for ship and
non-ship objects is consistant. The previous behaviour returned the
room description for the bridge of a scanned ship. The new behaviour
evaluates the INFO_SCAN_STRING attribute on the object performing the
scan, and returns the result.
- Moved the PSE added functions from the predicates file to platform.c
to reduce the size of the patches applied to the MU* server.
- Updated the patches to account for the changes to predicates and
platform.
NOTE: You are strongly recommended to re-apply the PSE patch to a
clean copy of your server. A significant bug was corrected in
this release which requires that the new patch be applied.
Patch v0.9.4
============
- Fixed a bug in the Penn version of getEvalAttr which would cause a
crash. Events should work correctly on Penn now.
- More complete support for 'long long' for ranges and coordinates. It
should at least compile and run with this enabled. How well it works
will be dependant on the space designer and the server used. Doing
math on long long values using server calls is probably going to
fail as the servers all use the standard int type.
- Added a new spacecall - console_emit - which emits to particular
groups of consoles on a ship. See the html documentation for more
details. Basically:
console_emit(oflags, aflags, string)
- Added some sanity checking in the damage storage string. It now
logs an error if the string is not the correct length (26). The
code also overrides any settings for dorsal and ventral shields
in 4 shield configurations, and marks them as not-present.
- Fixed an emit in the sensor update code which meant that contact
names were not being emitted. (Reported by Jaynin).
- Added a parameter to the EV_DISABLED event. %0 is 1 for the
active-disabled transition, and 0 otherwise. This can be used to
emit messages to the entire ship when it is disabled, while
maintaining compatability with existing code. I also cleaned up
the code to only emit the disabled message the the bridge and
to engineering once, and added some checks for bridge != engineering
to prevent multiple emits to the same location.
- Fixed EV_INSIDE_CRITICAL and EV_OUTSIDE_CRITICAL parameter passing
so that the contact number, and not the contact structure address
is passed to the event. (Reported by Jaynin).
Patch v0.9.5
============
- Fixed an unprotected dereference of ship data for non-ship objects
in the tractor code. This caused a SEGV when locking tractors to
a non-ship object.
- Fixed a potential problem with the distance / sensor calculation
code. This may cure some reports of contacts disappearing for no
apparent reason.
- Updated some of the shield module code. It's still not all there,
but a bit more is completed. Changed the default condition to
'not enabled' in spaceconf.h
- Renamed interface.h to pseint.h to remove a conflict with a server.
- Removed the manual define of MUX/MUSH/PENN from spaceconf.h in
favour of automagically passing the define as part of the compile
flags.
NOTE: If you do not rebuild your server with the patches included
in this release, you should make the following changes to
your server Makefile:
MUX: Replace: MUDCFLAGS="$(ALLCFLAGS)"
With: MUDCFLAGS="$(ALLCFLAGS) -DMUX"
in 3 places.
MUSH: Replace: MUDCFLAGS="$(ALLCFLAGS)"
With: MUDCFLAGS="$(ALLCFLAGS) -DMUSH"
in 3 places.
PENN: Replace: MUDCFLAGS="$(ALLCFLAGS)"
With: MUDCFLAGS="$(ALLCFLAGS) -DPENN"
in 2 places.
- Moved the flag handling functionality of the PSE into a separate
source module - flag.c/flag.h. Also changed the flag handling
for the object and ship flags to use a human friendly format in
keeping with the console type flags.
- Changed the ST_FLAGS and ST_SHIPFLAGS to use symbolic names. The
old binary flags are automatically updated. *NOTE*: Each space
object added to space will be has the old-style binary flags
converted. If you use parents, the parent objects will not be
updated, so you may want to add a single object to space, and
then copy the converted flags onto the parent. A copy of the
pre-conversion binary flags are written to the server logfile.
Patch v0.9.6
============
+ Moved object distance lists into the space_info structure, and
partially reworked some of the sensor update code.
+ Reworked shield plugins to allow parameter passing during object
initialization.
+ Reworked the contact handling code so that each object has its own
contact numbers. It works as follows:
If object A has no contacts, the next new contact will have
contact number 1.
If object A has contacts, the next new contact will be given
the previous contact number plus 1.
Example:
Object A sees Object B as contact 1
Object A sees Object C as contact 2
Object A loses Object B
Object A sees Object B as contact 3
Object A sees Object D as contact 4
Object A loses Object B, C and D
Object A see Object B as contact 1
+ Updated the stale contact detection code to use a turn id instead
of a 'is current' flag. This avoids a complete scan of the contact
lists to clear the 'is current' flag.
+ Added a spacecall to do some checks on the sensor structures to help
track down reported oddities with the sensor code. Any problems are
written to the space_debug_char, and logged. To use it, just:
sc(sensor_sanity,)
+ Fixed the EV_NEW_CONTACT / EV_LOST_CONTACT events to pass contact
numbers, not pointers to contact structures to softcode.
+ Fixed the abbreviated contact list check to only flag ships that
have locked onto the sensor. Previously, spurious locks were
shown for any contact that had locked weapons on any other vessel.
+ A fix to the torpedo fire table code so that only attackable objects
are added to the table.
Patch 0.9.7
===========
+ Changes to the sensor optimization code. Using an id rather than a simple
flag. Maintains useful status information about the time of the last
position or heading changes for objects in space.
+ Added a 'TRACTORABLE' object flag. An object can only be locked onto by
a tractor beam if it has this flag set on it (and is not set 'HUGE').
+ Fixed a SEGV in the event code when EV_OUTSIDE_CRITICAL is called for
an object. Reported by Jaynin.
+ Updated some of the build process for the help files. This is still in
progress as the fix for the SEGV needed releasing asap.
Patch 0.9.8
===========
+ Fixed a bug in the changes to the sensor code which meant contacts
could linger forever.
+ Updated help file layout, and added some descriptions to the
spacecall sections of the new pages.
+ Fixed the shield allocate routine to emit the correct available
energy amount. Previously it was using the navigation allocation,
rather than the shield allocation. Reported by Jaynin.
+ Fixed a bug in the sensor code which meant moving objects using
set_pos from sensor-update events could cause mis-ordering of the
distance sorted list of space objects used for new contact checks,
and subsequent malfunction of the sensor checking code.
+ Fixed a problem where an object being fired upon could receive an
incorrect contact number if it was not a ship. Reported by Jaynin.
+ Added an acceleration factor for changing speed. The value is the
maximum rate of change of speed, and is stored in the
CF_WARP_ACCEL attribute.
+ The html documentation is now supplied only in the unbuilt form.
To build the htlm documentation, please run 'build' in the docs-src
directory. This will create the html documentation in the docs
directory.
+ Fixed a bug with MANUAL_DIR which was taking the elevation from
the MOVE_HEAD_BEARING attribute.
+ Added some sanity checks to the values returned when using
MANUAL_DIR.
Patch 0.9.9
===========
+ More sensor updates. Fixed a buglet in the update code which
could mean ships were not correctly updated in the linked
list code.
+ Documentation updates for the 0.9.x series features.
+ Patch updates to the current TinyMUX, TinyMUSH and PennMUSH
servers.
Patch 0.9.10
============
+ Added the gun arc support from Chris DiPierro.
NOTE: You *must* set CF_GUN_ARC to 63 to emulate the previous
behaviour if you upgrade to this, or any later release.
Failure to do so will mean your guns will not be able to
fire at anything.
+ Added get_debug_char() and set_debug_char(dbref) calls to
replace the @admin parameter used in TinyMUX and TinyMUSH
for selecting the log object.
+ Updated the help files for the changes in this release.
+ Fixed bugs reported by Michael Rudel:
- Fixed help for cause_damage spacecall.
- Fixed 'detail ' so emit only to the player using
the command, rather than all of the tactical consoles.
(It's not a 'change of state' hence only to the player)
- Fixed the EV_DESTROYED/EV_TAKE_DAMAGE interaction, so that
EV_TAKE_DAMAGE is not called if the object is destroyed
by the damage taken.
+ Updated patches for TinyMUX, TinyMUSH and PennMUSH to remove
the @admin parameter code from Tiny*, and to rework the
spacecall permission checks so they are the same with all
three engines. [Based on Penn support work by Michael Rudel]
+ Sensor bug found and corrected during object initialization.
This should fix all the misplaced objects reported by the
sensor_sanity spacecall.
[Thanks to Chris DiPierro for helping track this down]
+ Updated the character used to indicate the space flag to a
'y' on the Tiny* platform, as 'z' is already used in Penn.
NOTE: You are strongly recommended to re-apply the PSE patch
to a clean copy of your server. Significant changes
were made in the server-PSE interface for this release
which requires that the new patch be applied.
Patch 0.9.11
============
+ Changed MAX_CHANNELS to MAX_COMM_CHANNELS to sidestep a benign
header conflict with the Penn chat system.
+ Ensured that objects start at (0,0,0) if the ST_STARTPOS
attribute on the space object is invalid.
+ Prevented changes to the SHIP flag, as this causes a crash.
[Crash reported by Ra'kholh(Rak)]
+ Added attribute retrieval functions that fill a provided
buffer. This removed the need for a buffer copy.
+ Added a memory handling patch from Cameron to add pse_*
memory management routines.
Patch 0.9.12
============
+ Added a database list parser, next_dbref() and updated the
ship console loader to use it.
+ Updated the ship loader to use the new getAttrByNameLen()
calls to avoid extra strcpy calls.
+ Cleaned up the error messages when loading faulty ship
objects.
+ Fixed a possible buffer overrun when loading gun and torp
name attributes.
+ Fixed a compile problem with the Penn port in platform.c
+ Updated INSTALL help with some 'just type this' type
instructions.
+ New pair of spacecalls based on code contributed by
Chris DiPierro.
sc(write_object) : Updates the attributes on the object.
sc(write_all_objects,space) : Calls write_object for every
object in the given space.
Patch 0.9.13
============
+ Fixed energy allocation bug. Previously, allocations of
huge energy amounts would overflow an int counter used
to check the total allocation against the allocated
energy. Thanks to Hans for prodding me again on this.
+ Corrected the return type from the distance function
to be range_t. A few related type changes in the code.
+ Completed the weapons lock/unlock/abort message set.
I also created EV_LOCK_ABORTED, EV_ENEMY_LOCK_ABORTED,
EV_ENEMY_LOCK_ACHIEVED events as part of this update.
+ Added EV_TIMER events. This implementation creates timer
lists for each space. Timers are created using the
add_timer spacecall, and an optional soft-code id
string is stored with the event. Single shot,
multi-shot, and repeating events can be setup. Each
space object can have multiple event timers active.
A del_timer spacecall can delete all the timers for
the object, or any that match a given id string.
add_timer(first interval, other invervals, repeat, id)
The id can be an empty string. The repeat count can
be 0, which indicates a timer that repeats forever
(until it is removed)
del_timer(id)
The id can be an empty string, which will remove all
the timers for the object.
EV_TIMER is called with 'id' as the first parameter,
and the number of times that the timer has been
triggered in the second parameter.
+ Added an optional 'run_cycle(space)' spacecall for
using PSE with turn based games. You need to uncomment
the appropriate #define in spaceconf.h.
Note: there are 6 cycles to a complete turn, and the
spacecall only sets a flag which is tested every second.
Expected use:
Add a 'control' object to each space, and set a repeating
timer on it. The EV_TIMER event is called before the
main cycle update code, so you can use it to issue all
the spacecalls that you queued up in the last turn.
run_cycle(space)
Space can be -1 to indicate all spaces, or just an
individual space.
Patch 0.9.14
============
+ Updated timer code to be more robust if the timer calls are
called from the timer event. Also reworked so that an expire
time is kept, rather than decrementing a counter. This avoids
unnecessary memory writes.
+ Fixed check for being decloaked when attempting to decloak.
[Reported by Chemosh]
+ Fixed a missing cloak-disengagement check when reallocating
shield power which meant cloak would stay engaged.
[Reported by Chemosh]
+ Provisional fix to the maximum warp calculation function.
Appears to fix some of the tractor problems.
[Reported by Chris DiPierro, twice!]
Patch 0.9.15
============
+ Added the option for floating point coordinates. This gives
the possibility for using non-integer speeds, and hence
the much asked for impulse speed.
+ Added provisional speed handling for speeds less than warp.
Currently very basic, but seems to work.
TODO:
+ Add a delay during landing.
+ Revamp damage system.
+ Finish shield plugins.
+ Add a better was to store system damage in ST_SYSTEM_DAMAGE.
+ Add code to allow a 'rated maximum speed' to be set, and for ships to
take damage if it is exceeded.
+ Maybe prevent changes to the HUGE flag, as changing it has no
effect after the object is added to space. Maybe fix it properly
so it has the right effect.
+ gun_hit_calc, torp_hit_calc - functions to do the hit calcs
and return the results.
+ Compile time options for original chuckles shield allocation
from navigation.
+ Track down tractor beam oddities.
+ Large floating point universe work.
+ Sub-warp speed travel.