Welcome, Guest. Please login or register.
Kingdoms of Ahln
Pages: [1]
  Print  
Author Topic: KAMS 0.3.0 Released  (Read 2629 times)
Justin
Administrator
Citizen
*****
Posts: 190



View Profile
« on: July 09, 2009, 12:01:36 am »

This is not really a huge release, but it's been a while and I thought it would be good to get some of these changes out there. The main additions are the TYPO, BUG, and IDEA commands, as well as a start on making reactions considerably easier to write.

Added:
  • BUG, TYPO, and IDEA commands
  • init event for reactions
  • take_damage event for reactions
  • Delay reactions certain number of ticks
  • Several methods for writing reactions
  • Room#exits

Fixes:
  • Wrapping with ANSI should be much better
  • Stats should not be less than zero
  • Emotes match $me properly
  • Logs are flushed when using ALOG
  • Errors during reactions are logged
  • Mobiles now die after getting hit, not before

Changes:
  • AINFO now requires '@' before properties
  • Searching Garys should be a little more efficient

Downloads are available here.

Important: There is a bug in later versions of Ruby 1.8.7 (patch level 160 and higher) that causes a segfault. I highly recommend using Ruby 1.9.1 or 1.8.7p72.

Here are some examples of the new reaction stuff:

Code:
#Do something with a given probability on the tick
!action
tick
!test
true
!reaction
with_prob 0.3 do
    emote "yawns, not even trying to conceal #{pronoun(:possessive)} boredom."
end

#Pick a random action
!action
poke
!test
object_is_me? event
!reaction
random_act "emote glare at #{player.name}", "say hey!", "poke #{player.name}", ""

#Move randomly on the tick with a given probability
!action
tick
!test
true
!reaction
random_move 0.5

#Give someone a sword if they ask for it
!action
say
!test
object_is_me?(event) && said?(event, "sword")
!reaction
make_object Sword
act "give sword to #{player.name}"
sayto player, "There you go. Don't cut yourself."

« Last Edit: July 09, 2009, 01:05:38 am by Justin » Logged
Saffire
Citizen
***
Posts: 136


View Profile
« Reply #1 on: July 15, 2009, 06:09:51 pm »

Segfault? What's that, and how would I recognize one if it happened to me?
Logged
Justin
Administrator
Citizen
*****
Posts: 190



View Profile
« Reply #2 on: July 15, 2009, 06:17:04 pm »

A segmentation fault is when a program tries to access memory it isn't allowed to access.

You would recognize it if it happened because the program would screech to a halt, usually with the simple message "Segmentation fault".

The issue I was mentioning above is apparently some bug in Ruby's gdbm library, and if you are running KAMS and you have that bug, the server will shutdown right after it starts. It is not subtle.
Logged
Saffire
Citizen
***
Posts: 136


View Profile
« Reply #3 on: July 15, 2009, 06:19:19 pm »

Oh, ok. That's not my problem then. Thanks for explaining that for me Smiley

Back to the drawing board.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.15 | SMF © 2006-2009, Simple Machines
Terra97 design by Bloc