Monday, March 7, 2011

Grandroids and LNA

So in case you've been living under a rock, you probable know that Steve Grand, the original mind behind Creatures, is working on a new artificial life project and has a kickstarter fund going to help cover his cost of living while he works full time on it.

This is essentially our Creatures 4, guys. It may not have norns, but I'm telling you, if you were drawn into Creatures for the science and lifelikeness of it, this is more than worth getting really, really excited about!

Even though the project has passed its requirement to be funded, you can still pledge until April 8th, and the rewards are more than generous. For $50, you get a copy of the final version of the game, and you get to beta test it. Seriously, fifty bucks isn't much more than what a lot of games retail these days, and those games don't generally contain groundbreaking developments in AI. Just think of it as a really, really early pre-order. Or, for $75, you not only get to test the game, but you get access to development tools such as gene editors and the like to get a jumpstart on developing (my personal interest of course). Just the thought of being a part of that whole process thrills me to no end.

There are other pretty nice rewards if you can afford to pledge more, so check it out and support the next generation of sillicon-based life!

On another note, yes, I've pretty much dropped off the face of the earth and I don't know that I'll really ever have the time to climb back up, but I did get a new computer and used the old one to fire up Live Nornish Action again, so pop by and say hi if the stream is up! I have a few ideas I'm working on to make it a bit more interactive-- an agent that lets you adopt creatures straight from the LNA world for instance, but I'll see what time I can find. You guys probably know by now that my ideas tend to far outweigh my actual productivity, heh.

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! :)