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!
A Creatures blog about everything from raising norns traditionally to tinkering with their brains to changing the world they live in.
Pages
▼
Monday, June 14, 2010
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!
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! :)
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!
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!
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!
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!