Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 4

Author Topic: RawScript: Test Released! Check first post.  (Read 2929 times)

madk

  • Bay Watcher
    • View Profile
    • pineapplemachine
RawScript: Test Released! Check first post.
« on: June 26, 2010, 04:33:18 pm »



Ahar, release!

At the moment, it can't do anything to the raws, I haven't worked on that yet since this rewrite. The code will be easy to transfer from the previous work, though.

Please read the comments in the code file to get an idea of what's going on.

Download

Conditional statements and loops are probably next. Shouldn't take long, I've already got the groundwork implemented in the parsing loop.









I figure now's as good a time as any to announce this. RawScript is a program that functions similarly to UristMod, but with several improvements.

What it's got so far:
+ Intelligent parsing of the raw files and efficient version-independant recognition of tokens and object types
+ Easy, comprehendable syntax for choosing what objects in the raws you want your changes to affect
+ Removing tags from the objects, appending them to their ends, and changing the arguments of existing ones
+ Conditional modification to aid inter-mod compatibility

What I'll be adding before I release it:
- Apply changes only to certain castes
- More flexible object selection capabilities
- Create and delete entire objects from the raws
- Write thorough documentation
- Record changes installed to a separate file to allow streamlined uninstallation of modifications.

Here's an example of a functional* program in RawScript

Code: [Select]
Include OBJECT:CREATURE
Select TOKEN:PET_EXOTIC
Remove PET_EXOTIC
Append PET
Exclude *
Include OBJECT:CREATURE
Select TOKEN:MOUNT_EXOTIC
Remove MOUNT_EXOTIC
Append MOUNT

*minus a couple bugs, and it probably wouldn't work too well considering I haven't finished caste support just yet  :P

« Last Edit: June 30, 2010, 07:47:39 am by madk »
Logged

Flaede

  • Bay Watcher
  • Beware the Moon Creatures.
    • View Profile
Re: RawScript
« Reply #1 on: June 26, 2010, 04:40:54 pm »

While I do not have the knowledge to do it myself, I've been hoping for something like this.
Logged
Toady typically doesn't do things by half measures.  As evidenced by turning "make hauling work better" into "implement mine carts with physics".
There are many issues with this statement.
[/quote]

Star Weaver

  • Bay Watcher
    • View Profile
Re: RawScript
« Reply #2 on: June 26, 2010, 07:28:12 pm »

Will it be able to deal with tokens that create section-like areas in objects? EG, can I say "remove [DUTY_BOUND] from [POSITION:HAMMERER] and add [APPOINTED_BY:EXPEDITION_LEADER] to [POSTION DUNGEON_MASTER] in [ENTITY:MOUNTAIN]"?

How about creating things based on other things, e.g. "for each OBJECT:INORGANIC where IS_METAL duplicate appending _F to name, from duplicate remove [ITEMS_HARD] add [WAFERS]. then for each OBJECT:INORGANIC where name ends with _F create OBJECT:REACTION <template where bits are filled in with name of for-eache'd object>"

Lookin good though, I was worried I might have to do this myself :)
Logged

madk

  • Bay Watcher
    • View Profile
    • pineapplemachine
Re: RawScript
« Reply #3 on: June 26, 2010, 08:13:22 pm »

Whee, you sorta lost me there.

:/

Normandy

  • Bay Watcher
    • View Profile
Re: RawScript
« Reply #4 on: June 27, 2010, 12:49:56 am »

For the first part, he means if it will be able to handle blocks like in entity positions, where there are multiple references to the same tag in each of the different positions; Uristmod is unable to differentiate between, say, removing [DUTY_BOUND] from [POSITION:HAMMERER] or removing it from [POSITION:BARON] (I'm not actually sure if it's in POSITION:BARON, but you get the point).

For the second part, if we wanted to make an "enchanted" duplicate of every single stone, would RawScript be able to do that?
Logged

madk

  • Bay Watcher
    • View Profile
    • pineapplemachine
Re: RawScript
« Reply #5 on: June 27, 2010, 08:05:00 am »

First:

I can make this possible if someone can explain to me the difference between them and castes, or at least point me toward some relevant raws.

Second:

Yes. Not yet, but that falls under "Create and delete entire objects from the raws", which includes a "copy" command. Though to fully realize its extent, the "More flexible object selection capabilities" than just what I have now would probably have to come into play. TL;DR yes, it will be availabe by the time I release.

Normandy

  • Bay Watcher
    • View Profile
Re: RawScript
« Reply #6 on: June 27, 2010, 11:54:05 am »

Actually, yeah, come to think of it, it's pretty much like castes.
Logged

madk

  • Bay Watcher
    • View Profile
    • pineapplemachine
Re: RawScript
« Reply #7 on: June 27, 2010, 02:49:32 pm »

Does each caste have positions, does each position have castes, or are they independant of each other?

Normandy

  • Bay Watcher
    • View Profile
Re: RawScript
« Reply #8 on: June 27, 2010, 03:43:16 pm »

Castes are a creature thing, positions are an entity thing; they're separate. I think. I haven't really played around much with either yet, but I mean to get around to it.
Logged

madk

  • Bay Watcher
    • View Profile
    • pineapplemachine
Re: RawScript
« Reply #9 on: June 27, 2010, 05:07:45 pm »

I see. I'll make it work.

Flaede

  • Bay Watcher
  • Beware the Moon Creatures.
    • View Profile
Re: RawScript
« Reply #10 on: June 28, 2010, 12:47:03 am »

I see. I'll make it work.

But from what I understand, positions can be tied to specific castes? can they? is this just a rumour?
Logged
Toady typically doesn't do things by half measures.  As evidenced by turning "make hauling work better" into "implement mine carts with physics".
There are many issues with this statement.
[/quote]

Emong

  • Bay Watcher
    • View Profile
Re: RawScript
« Reply #11 on: June 28, 2010, 12:55:06 am »

I see. I'll make it work.

But from what I understand, positions can be tied to specific castes? can they? is this just a rumour?

They can be limited to creature classes, which can be assigned to a caste.
Logged

madk

  • Bay Watcher
    • View Profile
    • pineapplemachine
Re: RawScript
« Reply #12 on: June 28, 2010, 06:05:53 am »

So wait. Are positions an OBJECT or are they a part of a CREATURE, or something else entirely? If they're just on OBJECT, then yeah, this thing can work with them already. It parses the raws in two passes, the first gathering information on things like this, the second to read it using the information it found.

madk

  • Bay Watcher
    • View Profile
    • pineapplemachine
Re: RawScript
« Reply #13 on: June 28, 2010, 07:27:33 am »

Ok, so they're basically castes for ENTITIES.

I'm adding capability to flexibly handle subgroups so that as new modding things are added or if I forgot something, these subgroups (castes as a subgroup of a creature, positions subgroups of entities) can be handled without issue.

EDIT: Weapons seem to be another subgroup of entities. So yeah, this system is definitely going to be necessary to support proper modding.
« Last Edit: June 28, 2010, 07:29:30 am by madk »
Logged

madk

  • Bay Watcher
    • View Profile
    • pineapplemachine
Re: RawScript
« Reply #14 on: June 28, 2010, 07:32:07 am »

Ok, I need to know how entity 'symbols' work.
Pages: [1] 2 3 4