Tuesday, July 6, 2010

"Voice" activated agents

Wooow life has been busy lately. Between running the CCSF Surveys and having some friends in town, on top of work, keeping the house clean, and all that fun stuff, I haven't had a whole lot of time for Creaturely enjoyments. Regardless, I figured I would make a post about something I have been fiddling with the last few days.

As a few of you may know, I can't sprite. As fewer of you may know, I don't -like- to sprite. Okay, I can enjoy spriting things when the sprite is the charm of the agent, like a critter or a plant, but when I'm coding something utilitarian, like a control panel or a machine, spriting is just this annoying necessity that I have to do to make my code accessible to the majority. As such, I generally seek to find ways around it. Shortcut keys are one example. But lately I've been experimenting with "voice" activation, that is, simple commands are typed into the hand's speech bubble to trigger certain scripts. I'll share what I've found so far-- it's fairly simple if you understand some CAOS basics.

You'll want to set this on short timer script-- shorter than it takes for speech bubbles to possibly disappear unseen.

enum 1 2 9

1 2 9 is the classifier for all the speech bubbles, including those made by creatures. This script is essentially going to search every speech bubble in the world for a certain trigger phrase.

doif ov80 ne 1
setv ov80 1

When the script is running possibly several times within a speech bubble's life, it's very possible that it will search the same bubble more than once, and thus produce the effects more than once. To stop this from happening we want to "mark" each speech bubble that we search by changing an ov (I use 80, but you can really use anything the speech bubble doesn't already use) to reflect this. If the bubble has been marked, the script passes over and ignores it, if it is unmarked, the script marks it and carries on with the script.

part 1

part 1 is the text part of the compound agent that is the speech bubble, so the script needs to focus on that to see what's inside.

sets ov82 ptxt

And in just about five lines of code, you have the text of a speech bubble stored in ov82! But it's not finished yet, because when you're searching the bubbles for a trigger word, the searches are case sensitive, so to prevent problems with that you'll want to convert it to all lower case:

sets ov82 lowa ov82

Better. Now you can set your trigger scripts here. Most commonly you would do something like:

doif ov82 = "cheese"
*insert whatever script the word "cheese" will trigger
endi

but the trigger word doesn't have to match the speech exactly, you can also used a SINS command to search inside the text instead of matching it directly.

doif sins ov82 1 "cheese" ne -1
*insert cheesy script
endi

This option will trigger the script if your speech bubble contains the word "cheese" at all, so if you said "I love cheese" or "This cheese is green" the script would trigger. You can actually make some very complex commands if you use SUBS to break up the strings, too.

Make sure you close out your script with endi and next!

It's worth reminding you that this does read all speech bubbles including those of creatures, so you could do something like search the text for the phrase "hungry for starch" and cause the script to get the location of the bubble and go drop some seeds there (though you would probably want use the catalogue tags instead of directly searching for the word/phrase to keep it compatible with non-english versions of creatures).

The upside to these command-activated agents is that they require no sprites and no items to clutter your screen or keep track of. I guess the downside would be that if there were a lot of commands involved, people would be more apt to forget them all.

What do you guys think? Would you use a "voice" activated agent or do you prefer to push a button?

Monday, June 14, 2010

Windows App for Development Research!

If you're a developer who's still learning the ropes of CAOS, Windows Grep may be of great use to you. It's not a tool made especially for CAOS development-- it is just a simple, light application that searches the text of all files in the folders that you designate for a word or phrase, but if you are just learning CAOS, this can be pretty invaluable for learning how different CAOS commands are used.



Let's say, for example, you don't quite understand how the "anim" command works and would like to see it in context to get a better idea. You would open up Windows Grep, type in "anim" and make sure the "find whole words only" box is checked so it doesn't return comments that might contain "animate," "animation," or "kanimakoo" (if that was actually a word).


Next you'll want to select the folders that the cos files are stored in. For most of you this will be the bootstrap directories in both your C3 and DS folders. If you often use a PRAY decompiler such as Jagent or REVELATION, you may want to select that folder as well so it can search the cosfiles of agents you have decompiled.



Next you'll want to add the *.cos extension to filetypes to be searched. You may have to add it in the "Custom file specification" box.



Tada! The search process takes almost no time at all, maybe five seconds at the most on my computer. The window will list all files that contain the "anim" command, and selecting the file will list every line where that command appears in that file. If you mouse over the page-shaped buttons in the top bar, you will find that you are able to toggle between showing the matching lines and showing the whole file, making it relatively easy to see how a command works in context.

The nice part is that the program remembers the folders and extensions you last selected, so if you want to look for a different command, all you have to do is search again, enter the new query on the first page, and click "finish." Even after you exit the program, it remembers the conditions of your last search.

This really is a very nice tool for developers or just generally curious people. Just be careful what you touch-- the program is also capable of searching and replacing words or phrases in the files-- something that could easily screw up your game if you're not careful.

I hope this can help some of you guys out. Happy searching and developing!

Tuesday, June 8, 2010

Help Plan CCSF 2010!

It's time to start planning the wonderful festivity that will inevitably be CCSF 2010, and we need your input!

The CCSF 2010 Surveys are currently underway! Right now Survey 1 is open and will run until June 22nd. This first survey runs a bit longer to give us extra time to spread awareness, but later surveys will only be open a week, so hopefully we will come to a decision quickly.

Visit the CCSF 2010 Survey Center to input your ideas! And please, please help spread the word of this around as much as possible! I would hate to have people show up with great ideas after things had already been decided.

Happy Planning!

Monday, June 7, 2010

Half-released cosfiles

I call these "half released" because they've technically been available in other parts of the CC-- usually in a thread where someone requests a fix and I upload it directly to that thread. But I've pulled a few of them together into this post for everyone to enjoy.

Again, these are cosfiles, not agents, but most of them are the sort of thing you'd like to drop in your bootstrap folder so they'll affect all your worlds anyway. They also have not been fully tested, so please do report any problems you have. Additionally, you may have to right-click and "save as" in some browsers to download them.

No Seasonal Gender Bias -- Gender, as you may or may not know, is affected by the in-game "seasons." You can't generally tell, as very few agents depend on them, but the world does go through an invisible cycle of seasons. In the spring, creatures have a 75% chance of giving birth to females, and in the autumn, a 75% chance of males. Summer and winter grant an equal chance. This can sometimes be frustrating, especially for feral runs that rely on a good male/female balance, so this modified egg-laying script gets rid of that and makes the genders 50/50 regardless of the season. (Someone requested this in CC IRC, and I can't for the life of me remember who. But I hope you find it, whoever you are!)

Bypass Import Cloning -- You know that annoying box that pops up and makes you clone and rename most creatures when you try to import them? It's there to stop the warp server from getting confused, as it tracks creatures that go through the warp based on their moniker, So if you try to import a norn that was not directly exported from one of your worlds, the game clones it, gives it a new moniker, and all is well. But norn tracking has been broken on the DS server for ages anyway, and it really can be frustrating to rename every norn that you download, so this modified script will import creatures without cloning them. However, it will still clone a creature if another copy of it already exists in your world (or has existed in the past and died).

Wolf Control Fix -- This is something that may not be needed much yet, but I honestly think will become more and more necessary as time goes on and computers get faster. I first noticed when trying to run small wolfling runs in near-empty worlds, I would come back to find that wolf control had thrown a strange "divide by zero" error message when left in fast ticks. I dissected the cosfile to find that RACE, which returns the time in milliseconds which the last tick took, was being divided to find the frame rate. When DS is in fast ticks on a fast computer, it is possible that a tick can occasionally take less than a millisecond, causing the game to try to divide by zero and crash. This fix simply checks to make sure that RACE is not zero before it divides it!

CV Shortcuts -- This is not a DS cosfile; it is actually for Creatures Village. Some people have reported problems with it that I have not been able to reproduce, so use at your own risk. This just adds a few keyboard shortcuts to make CV a little easier to explore-- Ctrl+0 will "disconnect" your camera from your selected creature, allowing you to scroll around the room as you please. Ctrl 1-9 act sort of like favorite place shortcuts and take you to various places of the world (you can edit the cosfile to easily change these). Shift+Ctrl+1 will teleport the currently selected creature to your hand, and Ctrl+Q will export the current creature, though I haven't bothered finding a way to import them again, so it's fairly pointless.

Hope you all enjoy! :)

Friday, June 4, 2010

Agent: Population Control Options

A thread came up on Creaturetopia recently regarding a feral run, and one of the topics covered was population control. I did make some cosfiles a while back to help with population control, but I was inspired to construct them into something a bit more tangible:



This options panel provides you with several options for population control within your world. It can be toggled on and off with the keyboard shortcut shift+ctrl+O

For the most part, the options are self-explanatory-- click on the buttons to turn them on (green) or off (red). The blue numbers are editable and can be tweaked to your desire.

The first four options are export options-- naturally, if these are switched on they will override their infertile counterparts. The first option exports creatures automatically once they hit old age. The second is a bit complicated; it exports creatures of the lowest generation once the next generation is established with as many male/female pairs as you define. For example, if the number is set to three, the agent will watch your population and export all generation one norns when there are at least three male and three female norns of a higher generation than one. Keep in mind that it does not (yet) distinguish between species, so if you have the grendel/ettin egglayer running you will probably get a lot of generation 1 grendels and ettins in your exports folder.

The next two options are gender-specific; you can choose to have females exported once they have laid a certain amount of eggs, and choose to have males exported after fathering a certain number of children.

The fifth option should be used with caution, if at all. If you are leaving a wolfling run for a long time and/or your creatures are multiplying very quickly, the large amount of export files can add up fast. This option allows you to export only a fraction of the creatures meeting the criteria above, and painlessly kill the rest.

The remaining options are similar, only they attempt to keep the creature infertile instead of exporting it. Under normal conditions creatures will be unable to breed when they meet the selected criteria; however, if the creatures are exposed to fertility agents, it is not impossible for the infertility to be overridden, so use caution.

Keep in mind that this is a beta and hasn't been tested completely, so please report any bugs you come across, and as always, suggestions for future versions are welcome!


Download the Population Control Options here
, then head over to The Arch and read up on ArchDragon's feral run that inspired the agent to begin with!

Thursday, June 3, 2010

Action Script Modes

I wrote a few strange little scripts today that ultimately resulted in a creature's ability to randomly tint everything it pushes, just for fun. Kinda useless, but the scripting behind it might not be.

I've had this idea in my head for a while of the ability to switch the game into different "modes" when needed, modes that basically affect everything in the world and how it works. Creature action scripts, to be specific.

Creature action scripts (I don't know if that's the proper name for them but it's what I call them anyway) are the default scripts that define what happens when a creature does something or when something is done to a creature. You can find these in your bootstrap folder in files like "DS creatureDecisions.cos" and "DS creatureToCreature.cos." These are the scripts I modify to make my Critical Hit or Interspecies Breeding scripts.

What I set out to do today was to essentially create an easy way to shift between different sets of action scripts, between the default push/pull/eat/hit/mate/etc scripts and my custom ones, without having to reinject them every time (which often results in errors if there are creatures making use of those scripts).

It worked basically by making a "state" agent who's purpose was to act as a switch between the default scripts and the altered scripts. Then at the beginning of the default push script, I added a bit of code that basically said "check the state agent to see what to do." When the state agent is in the default state, it will tell the script to go ahead and run the script as usual, but if it is set to another state with a mesg wrt+ command, it will run an alternate script instead (or if the alternate script isn't there, the default script again).

To do this, the "state" is set to a number, 0 for default, and something like 1000 for alternates. If the push script is activated (script 17) and the state is set to an alternate of 1000, the script will add its number to the state number, thus running 1017 instead. But first it checks to make sure 1017 exists-- if it doesn't, it'll run script 17 anyway. So I can make a set of modified scripts one script at a time and not worry about errors being thrown if it's not a complete set.

I'm really not sure if there's a decent purpose for this system outside of development and testing, but it's an interesting little system. Possibly it could be used to switch easily between "easy mode" and "hard mode" sets of scripts-- right now I'm using it to switch between scripts that stim writ the creature and those that don't to try and find a way to teach creatures regardless of genetics.

Coming soon (hopefully): Population Control Tools!

Sunday, May 23, 2010

Why Develop?

So Moe recently made a fantastic post on his Creatures 2 to Docking Station development blog (which is awesome in and of itself, you should check it out if you haven't), aptly titled, "Motivational Speech."

Reading it really got me thinking about why I develop the stuff that I do for Creatures. I can't honestly say it's just for the community; though the community certainly inspires me, I don't think it's the sole reason I do what I do. The large number of personal projects kind of rules that out.

But after sorting through my head a bit, I think I've narrowed it down to two main reasons that I spend so much of my rare free time developing for this game.

The first is honestly just to see what is see what I can do. Pushing the previously-known boundaries of Docking Station is one of my greatest joys. I like to try completely new and strange things, in particular, things that radically change the way people play Creatures, or create another playstyle completely. Battlestance, though I never completed it, was probably my biggest attempt at this. SERU was another. Most of my little tweaks, the Hit Script and Breeding Script modifications stem from this too. Sometimes I like to just scroll through the CAOS documentation and come up with interesting or creative ways to use certain commands. I get endless joy from just taking the tools that I have and trying to explore every realm of possibility.

Though it has nothing to do with CAOS, LNA stems from this as well-- another attempt at doing something interesting that hadn't been done before. Heck, even blogging barely had a presence in the community; that's part of why I started this, and now look how it has taken off, with new wonderful creatures blogs springing up left and right! Maybe I'm a tad conceited but I like to think I had some hand in inspiring that.

So maybe my motivation does wrap back around to the community. I love to try new things at least in part because I love to inspire the community to push the boundaries as well, whether in creating new playstyles or new ways of networking. Huh. I always end up finding out new things just as I am blogging about them, hah.

But the second reason I develop is the one less-seen, and this is something I'm fairly certain is completely personal-- to find ways to make C3/DS creatures as emotionally attachable as possible.

This is a somewhat embarrassing story, but I was really into Creatures at a young age because I wanted to find a way to essentially program my own friends (I had quite a bit of social anxiety back then). I even went and learned enough about C2 genetics to make an near-immortal norn, and for a period of time I ran a C2 world 24/7 with nothing but this norn in it, growing relatively attached to it (though more as a pet than a friend) as I cared for this same creature for days on end.

Though I've long since found human friends, I still remember how attached I would get to C1/C2 creatures and how much C3 lacked that. Most of my development on this front never gets off the ground enough for me to talk much about it-- the instinct-less norns are one example, but my endless genomes and various script edits really haven't made it to light yet. It may be something I talk a lot more about in the future though.

So I ask you, developers of all sorts, why do you do what you do? Is it completely for the sake of the community, or is do you have a more personal goal you set out to accomplish?

Saturday, May 15, 2010

Norns, sans Instincts.

This is something I tried a few months ago and have completely fallen in love with, and if you're the nurturing sort of norn breeder that can't get much enjoyment out of C3/DS because it is just too "easy," I would highly recommend trying this at least once.

Silence all the instincts in your norns.

It may or may not be widely known that norns are pre-programed in their genetics to eat when hungry, push toys (or buttons, lifts, or machinery) when bored, rest when sleepy, and so on. They are also pre-programmed to push/pull a lift when they feel too high or low, or push a call button if no lift is nearby. Furthermore, C3 norns instinctively want to push tools (powerups) when they are bored, and DS norns want to push portals when they are crowded.

To me, this really doesn't make a lot of sense. A chichi norn might never see a portal in his life but still suggest another norn push portal when crowded. There's also really no reason for a creature to pop out of his egg and completely understand the mechanics of elevators. I can understand knowing to eat when hungry-- that's animalistic enough, but if norns are born knowing all they need to make it in the world, what do they need us for?


It's quite simple-- load up your favorite genome in the genetics kit, sort the genes by type, edit each gene labeled "Creature: Instinct" and check the box that says, "Do not express (carry)." The mutation chance will show up in parentheses to show the gene is silenced; it will sit in the genome, but not actually have any effect.

Or, if you don't want to go through all that, you can simply download Lily from TCR, a CFE bruin norn with the instincts already silenced for you.

If you leave a creature like this alone while it is young, it will die. It may last slightly longer if if happens to grab a piece of food and decides to try putting it in it's mouth, and it's quite lucky if it just happens to do so often enough to learn that eating is good, but even if it lasts to adulthood it will likely have no idea that it's supposed to push other norns to reproduce. So these creatures are most certainly not viable for wolfling/feral runs.

These are norns for those nurturing hands out there that enjoy it when their norns actually need them to survive. Fairly nostalgic of the C1/2 days really; I find it a lot easier to get attached to creatures like this.

After you spend some time teaching these norns the basics, they can usually survive alright on their own while you're raising the offspring, but beware that are some pitfalls to not having instincts.

First, the lift call button system and the food vendor system are both mechanics based on the half-strength instinct trick (scroll down to "Reactive Planning" at the bottom). Without instincts, these simply don't work, so while norns will still learn that they need to use lifts to go up and down, they won't understand the link between calling the lift and the lift appearing. The same applies to food vendors as well. This just means the hand will have to help out these creatures a little more when it comes to these areas, or just house them in metarooms where these things aren't necessary.

The other tricky thing is that norns with no instincts don't seem to properly learn to rest when they are sleepy. That is because resting doesn't actually decrease sleepiness--to my limited understanding, it increases it until the involuntary action of sleeping kicks in at a certain threshold and the norn falls asleep. This is logical, but the instinct-less norn doesn't understand this sequence, and instead believes that resting does nothing for his sleepiness and generally won't bother unless the hand commands it. I think there's a possible genetic solution to this, but I have yet to perfect it.

I think there's some potential in these little guys, helpless as they may seem. If you guys try it out, please share your experiences!

Friday, May 14, 2010

Crossbreeding Script

This one's been on my youtube for a couple days, but I'm only now getting around to writing about it. This is one of those weird things I did during one of my sick days this week. It was more or less just to see if it could be done, since to my knowledge no one has ever written a script to make crossbreeding possible, and it really wasn't that difficult. It just involved writing a breeding script out manually instead of using the the convenient "mate" command that does it all for you.



I wish I could say "no norns were harmed in the making of this video" but I would be lying. Guess I better watch out for ERFN. The thing about this script is though it makes interspecies breeding possible, it would still be very rare for it to happen naturally, since by instinct creatures generally stay within their species when looking for a mate (and normal grendels would probably beat a norn senseless before considering fathering her mutant child). It would probably either take a lot of encouragement, or a script like the one I used for this video that keeps creatures fertile and tells them to constantly push each other.

Still, it's really nice to have that possibility open. We've all had situations where the rogue norn wanders off to join the ettin tribe or the supposed-vicious grendel finds an odd friendship among the norns... What if those interactions had the potential of going further? It could add a whole new dimension to the game.

Anyway, like all my projects, the script is far from finished (right now it's not even checking to see if creatures are old enough before executing the script which is a little weird); I more or less just wanted to see if it could be done so I didn't bother coding in all those doifs. How long it takes me to finish it will depend on my free time and how interested you guys are in it, so if this strikes your fancy, do make your voice heard so I can figure out where to fit it in my priority list!

Wednesday, May 12, 2010

Creatures Fanfiction Podcast?

So I'm not entirely dead. I just needed to take a break from the community for a while, as life was getting a bit overwhelming. Stuff happens. I wouldn't even go so far as to say I'm "back." Well, I'm not sure I ever technically "left." I just found myself with nothing to say, nor time to say it, for an extended period of time.

I've still been doing plenty for Creatures, but they're more or less personal projects not really meant for release, partly because some of it is derived from copyrighted content and I can't be bothered to go about getting the necessary permissions to release the stuff, and partly just because I'd like to sort of do something for myself once in a while, without the pressures of making something that the community will be happy with. Nothing against you guys, it's just sort of the difference between a pizza that I order for myself, tailored exactly the way I like it, with Roma tomatoes, onions, sausage, and mushrooms, versus the pizza I order to feed my whole family, which really can't deviate much from cheese and pepperoni without a little brother or cousin exclaiming, "ewww!"

But delicious analogies aside, I wanted to toss an idea out there that's been floating in my mind for a while: A Creatures fanfiction podcast.

In sorting through some school stuff in the attic from around ten years ago, I discovered countless print-outs of Creatures fanfiction (and admittedly, some terrible attempts at writing my own). These were the stories I was essentially grew up on in the Creatures world, and the more I read them, the more I really appreciate the effort and creativity many of these authors took to take the Creatures universe and use it to tell a story with meaning that extends far beyond the boundaries of the game.

But fanfiction is, as I see it, one of the most under-appreciated things to come out of the Creatures Community. Literature in general has seen a bit of a decline over the years as TV, movies, and music have become preferred choices for entertainment. It simply takes a lot more mental energy to read words on a page and imagine the story unfolding than it takes to watch a movie telling the same story, providing all the visuals and sounds for you.

My proposal is to do an audio podcast, in which community-submitted Creatures fanfiction is read aloud, in some attempt to make these stories available to a wider audience. Those that might never have time to sit down and read usually still have time to turn on their MP3 player while driving or walking to work/school, performing mindless tasks, and so on. You could even listen to the stories while playing Creatures or idly browsing forums. By making an audio format available, it will be easier for Creatures fans to enjoy the literary crafts the CC has generated, and hopefully inspire the writing of even more.

I'm not quite sure how I would do the format, but the plan in my head is to first open submissions, inviting anyone to submit their fanfiction to the podcast. No limit to the number of submissions, but probably not all of them would be read. Stories would be picked to fill the space of an hour, possibly longer if the project really took off. Particularly long stories would likely be handled two ways-- either they would be split into parts and one part would be read each episode, or the first part would be read alone as a sort of teaser, with a link provided to where one could read the rest of the story. I would also be open to the idea of doing special edition series or something.

If it took off, I think it might also be fun to set themes once in a while, like stories about ettins or Creatures 1, stories told from a shee's point of view, or even poetry. Themes might help inspire people to generate new content rather than just submitting old stuff, too.

I also would like to look into possibly getting in contact with some of the authors of "classic" creatures fanfiction to get permission to read their stories, but I'm not sure how possible that is.

How often episodes come out would depend purely on the number of submissions. At the time of brainstorming I am thinking, for the size and activity level of this small community, that once a month sounds reasonable-- though I would love to do it more often if it ended up drawing a lot of attention.

There are a few things I am concerned about-- the first being the readings themselves, which is more or less a bit of self-consciousness I may just to get over. I've done readings before-- not necessarily in podcasts, but I've gone to live fiction/poetry readings and for the most part have received positive feedback about my reading voice. That said, not everyone is going to like it, and I know from the many fiction podcasts that I listen to that an annoying voice isn't worth listening to no matter how engaging the story is. So whether or not my reading voice is decent enough will really be up to the community to decide.

Another concern is that I don't have any professional recording equipment or anything, so the readings wouldn't exact have the high sound quality you're probably used to if you listen to a lot of podcasts. I can say, however, that they will be audible and not monotone. I may have nothing to work with but a $20 desktop microphone, but I know enough about recording software that I -think- I can produce something decent enough that people can tune out the imperfections and enjoy the story. That will, of course, also be up to you guys to judge.

These two concerns are things that can fairly easily be answered with a pilot episode, and (assuming there is enough interest for me to pull this off) that's probably what I'll end up doing: just record a "trial" episode and see if people enjoy it, taking into account any criticism.

The other concern is dealing with rejected stories. Not to sound like some sort of literary snob, but I while I have read many amazing Creatures stories, I have also read several that honestly were not worth my time. I don't want to seem like I'm putting aspiring authors down, but if I'm going to take the time to record fanfiction for others to listen to, I really want to try to ensure that I am reading stories the majority of the audience will find enjoyable, and that means I have to be a bit picky and choosy about what I put on the podcast. Nevertheless, I'm sure somewhere along the lines someone will get offended or upset that their story is not read, and I'm really not sure how to be completely objective and fair about my selection, as it really is a matter of personal taste. Obviously proper spelling, grammar, and formatting are important, but there is also a world of difference between a Creatures story and a soap opera with norns. I'm really not sure of the best approach to take to this. I still have to think a lot about this; I'm more than open to suggestions.

But I am possibly getting way, way ahead of myself here, as I haven't even gauged community interest to know if this is a worthwhile venture. I guess that's just my way of thinking-- I have to fully plan something out before I decide if it's worth doing or not.

So let me open this up to you guys. Would a Creatures fanfiction podcast be something you would be interested in listening to? Something you would be interested in contributing to? Not sure? Why/why not?

Any and all feedback is always appreciated; thanks guys!