Notice: If the game stops working after an update, it might be a savegame incompatibility. Remove your savegame folder and try again before posting about it.
Registration has an extra hurdle now: There have been advertisement bots, so I added a security keyword to registration. Deal with it.
  0 users browsing Director's Trailer. | 1 bot  
Main » Director's Trailer » PillowShout's Prose and Code Depositorium
Pages: « 123
Posted on 02-06-13, 06:38 pm (revision 2)

 

Posts: 58/105
Since: 12-06-12

Last post: 4021 days
Last view: 4003 days
OK, this update finishes off what I wanted to get done for the select tokens.

https://docs.google.com/file/d/0B_IgNCoukjzDc0ljLTQ3WTVDc1E/edit

This one adds recursive traversal of the token tree for 'select' tokens and two new types of keyword tokens, 'addto' and 'overwrite'. To see what these do, check the readme file.


One of the great thing about these new keyword tokens is that you can create certain class types for each bodyplan that can modify virtually any token within the plan to fit the class. This means that you could have random chances of encountering characters of one bodytype, but who may have something like different numbers of breasts, or people who've never been buttfucked and have both the virgin token and looseness: 0 versus those that have been, and don't have the virgin token and have some random looseness.

Yay for more variety!

Lead writer on Noxico (and sometimes programmer or designer) <br>
Posted on 02-06-13, 07:08 pm
<i>Prophet of Celestia</i><br>Baka on the streets, senpai in the sheets

Posts: 162/344
Since: 06-08-12

Last post: 1691 days
Last view: 1231 days
Yay indeed. Yay in-fucking-deed.

I don't just program Noxico...
Posted on 03-01-13, 11:21 pm

 

Posts: 60/105
Since: 12-06-12

Last post: 4021 days
Last view: 4003 days
Whoo! I'm back!

Well, sort of.

Sorry about the hiatus, but there was some crap I had to deal with over the past month and I wasn't feeling up to writing because of it. Unfortunately, said crap is still not entirely dealt with, so I won't be doing too much from now until whenever it's resolved. That said, even if I didn't feel like writing, I did manage to get some coding done, and now I present the fruits of my labor.

https://docs.google.com/file/d/0B_IgNCoukjzDQmhidDFOU3dkVmc/edit


After I noticed you doing a fuckton of refactoring, I decided that I'd like to do the same thing to the descriptions. I hope that as a result, using the description functions should be much more universal.

The biggest and most immediate change is that most of the descriptions for each token type have been moved into their own file (bodyparts.xml) rather than being hardcoded inside a function. This will hopefully create a more universal set of descriptions, and it means that even the LookAt functions can use them.

Next is the condensing or replacement of the old description functions. These have mostly (with the exception of the random euphemism functions) been modified to use the universal descriptions, and all of them have been changed to only return either the adjective describing a body part or the name of a body part, but never both. I'm hoping that this more atomic approach will allow for greater flexibility and make these functions useful even outside of dialogue.

Lastly, I've changed the names of several token replacement tags in dialogue to better use the new functions and to better adhere to the new atomic approach. The scene files I've included have all been updated to use these tags.


I'm sure there's probably some ways to improve what I've got here, so don't hesitate to make any changes if you think it'll make for a cleaner design.

Lead writer on Noxico (and sometimes programmer or designer) <br>
Posted on 03-02-13, 01:31 pm
<i>Prophet of Celestia</i><br>Baka on the streets, senpai in the sheets

Posts: 165/344
Since: 06-08-12

Last post: 1691 days
Last view: 1231 days
You really went to town on those descriptions, didn't you? I feel like I should do some major code work just to keep up.

I don't just program Noxico...
Posted on 03-13-13, 08:07 pm (revision 2)

 

Posts: 74/105
Since: 12-06-12

Last post: 4021 days
Last view: 4003 days
This one's a bit different as it's not a pure update so much as something of a prototype for the scheduler. (I know -_- ... I am trying to write, but I've been having trouble making anything I like well enough to use)

https://docs.google.com/file/d/0B_IgNCoukjzDbXptNmtKVkg4OUk/edit

This isn't something I'm expecting you to use, at least not right away, but it is something that I have wanted to have in the game for a while now as I've been getting pretty bored of the rather mindless behaviour of the AI. AI and intellegent systems are actually something of a minor obsession for me and I like making things at least seem smarter than they are.

The basic idea behind this system is that I wanted a scriptable and generic means of adding more intellegent behaviour to town people, and so, over the past few days, I created a rough, though hopefully easy to build on, means of doing that.

The only things that the system actually does right now are get a schedule (stored as a token tree) for each BoardChar in a town, use their schedule to determine which activity they should be performing given the current time of day, and then run the scripts contained in each activity type (These are all defined in an xml file).

Currently, I've only got token replacement working the way I intended it to, but because the script is being run by the entity itself, you could theoretically make the script do whatever the entity's script handler is capable of.

Right now, with their current (and only) schedule, the villagers will fall asleep around midnight - wherever they happen to be standing at the time - and then wake up at about 630 and continue wandering around.

I know it's not much, and that's why it's a prototype, but I think that this could be a good foundation for any future system we develope. Anyway, feel free to mess around with it, clean it up or make it better, and then add whatever kind of functionality you like. Have fun! :LOL:


Edit: Forgot to add these to the Code file, but you also need to add these lines to BoardChar.RunScript if you want things to work:

js.SetParameter("scheduler", this.scheduler);
js.SetParameter("Task", typeof(Task));
js.SetParameter("TaskType", typeof(TaskType));


Lead writer on Noxico (and sometimes programmer or designer) <br>
Posted on 03-13-13, 08:09 pm
<i>Prophet of Celestia</i><br>Baka on the streets, senpai in the sheets

Posts: 183/344
Since: 06-08-12

Last post: 1691 days
Last view: 1231 days
Well, if this works you'll be one step ahead from the scheduler I'd made and then #ifdef'd out. Let's see what this is...

I don't just program Noxico...
Posted on 03-14-13, 03:49 pm (revision 1)

 

Posts: 75/105
Since: 12-06-12

Last post: 4021 days
Last view: 4003 days
* Sees NoxicanDate content I forgot to send *

Crap. I knew I missed something! >_<

Lead writer on Noxico (and sometimes programmer or designer) <br>
Posted on 03-14-13, 04:17 pm
<i>Prophet of Celestia</i><br>Baka on the streets, senpai in the sheets

Posts: 185/344
Since: 06-08-12

Last post: 1691 days
Last view: 1231 days
Don't worry. I implemented comparison operators myself, and rewrote the part where it stores them myself.

I don't just program Noxico...
Posted on 03-15-13, 02:51 pm
<i>Prophet of Celestia</i><br>Baka on the streets, senpai in the sheets

Posts: 186/344
Since: 06-08-12

Last post: 1691 days
Last view: 1231 days
For the record, and to assist in making characters actually go to bed instead of sleeping on the spot, the ID for a given character's bed is (now) Bed_characterNameAsID. That is, <code>character.Name.ToID()</code>, or "Bed_Suzu_Saito". Unclaimed beds get Bed_entityCountSoFar.

It used to be buildingBaseID_Bed_characterFirstName, but I changed that because first names can be shared even in one board and the building base ID is superfluous now.

On a related note I just changed the ID generation for wardrobes from buildingBaseID_Container_containerType_characterFirstName to just Container_containerType_characterNameAsID. Same here with unclaimed containers.

I don't just program Noxico...
Posted on 03-16-13, 05:23 am (revision 1)

 

Posts: 76/105
Since: 12-06-12

Last post: 4021 days
Last view: 4003 days
Ok, I sort of have this up and running, but I'm having a few problems with the pathing. The BoardChars seem to be able to find their beds, but only if they're either inside their homes or if their doors are open. This leads me to believe that the pathing sees doors as impassable for some reason, but I'm not sure how to deal with this.

There's one other thing I'd like to know: is there some way to tell if a path cannot be made to reach a target? For instance, does the djisktra map set any flags if it can't create a path to its intended location? Or is there some sure way of telling if a Boardchar is blocked from getting to its target?

Lead writer on Noxico (and sometimes programmer or designer) <br>
Posted on 03-16-13, 09:11 am (revision 2)
<i>Prophet of Celestia</i><br>Baka on the streets, senpai in the sheets

Posts: 187/344
Since: 06-08-12

Last post: 1691 days
Last view: 1231 days
Doors work by setting the tile underneath them to walls when the doors are closed, and floor when they're opened. The mapper literally hits a wall where the door is.

What I'd do is have the Dijkstra mapper detect doors and just pretend there's not a wall there. That just leaves the question, will the NPC open the door when getting there?


As for unreachability, if we pass our starting coordinates to the Dijkstra mapper we can have the mapper try to probe down the path it just created. If a target hotspot can't be reached, chances are good that the probe'll vaccilate between two spots or stop moving at all, which can be detected before returning the map.
Addendum: if the spot on our starting coordinates is still the Very High Number, it's probably unreachable. This came to mind on reflection because when I click-pathed around for testing my character didn't move at all. Because he was on a VHN and surrounded by VHN.


Edit: Appending the following to Dijkstra.UpdateWalls() fixes the first problem.
<blockquote>
foreach (var door in board.Entities.OfType<Door>().Where(d => !d.Locked))
        walls[door.YPosition, door.XPosition] = false;
</blockquote>
Both the Player and any BoardChar end up using Entity.Move() to take the actual steps, and Entity.Move() is the where doors are opened, so that was already covered.

I don't just program Noxico...
Posted on 03-17-13, 08:49 pm

 

Posts: 80/105
Since: 12-06-12

Last post: 4021 days
Last view: 4003 days
OK, here's the next version.

https://docs.google.com/file/d/0B_IgNCoukjzDSjZHeG12TzNMRUE/edit

This one adds the FindAndGoto task to the list, completes the functionality of the Wait and Wander tasks and cleans up a bit of logic in the scheduler. I also added a function to the Dijkstra mapper that checks if a location on the map is a local minimum, which I'm using as my check for characters not being able to navigate any further.



Lead writer on Noxico (and sometimes programmer or designer) <br>
Posted on 04-02-13, 05:14 am

 

Posts: 89/105
Since: 12-06-12

Last post: 4021 days
Last view: 4003 days
Just a minor update to Scheduler. Also letting you know that I'm not dead yet.

https://docs.google.com/file/d/0B_IgNCoukjzDQ1VuOTQ2ODY1SUE/edit

Lead writer on Noxico (and sometimes programmer or designer) <br>
Pages: « 123
Main » Director's Trailer » PillowShout's Prose and Code Depositorium