Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 3 4 [5] 6 7 ... 21

Author Topic: Mod Base 0.95yy. Discontinued.  (Read 60646 times)

Sean Mirrsen

  • Bay Watcher
  • Bearer of the Psionic Flame
    • View Profile

Alright, got conditional append in, at least it should work as I expect it to.
Add a [!REPLACE!] tag at the beginning of your entry to avoid it creating an unfinished entry with just your changes, in case the target entry does not exist. This would be prudent for any changes being done to modded creatures, weapons, or races.
Logged
Multiworld Madness Archive:
Game One, Discontinued at World 3.
Game Two, Discontinued at World 1.

"Europe has to grow out of the mindset that Europe's problems are the world's problems, but the world's problems are not Europe's problems."
- Subrahmanyam Jaishankar, Minister of External Affairs, India

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile

How is it used? A correct example please :).
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Sean Mirrsen

  • Bay Watcher
  • Bearer of the Psionic Flame
    • View Profile

Well, suppose you are adding a piano to dark elves. In the current version, adding a
Code: [Select]
[ENTITY:DARKFOREST]
[INSTRUMENT:ITEM_INSTRUMENT_PIANO]
without the MA+ mod selected will very likely create an entry for the darkelven entity, and though they would not spawn, it could cause errors.

In the new version, doing this:
Code: [Select]
[ENTITY:DARKFOREST]
[!REPLACE]
[INSTRUMENT:ITEM_INSTRUMENT_PIANO]
will not create a darkelven entity entry, and will only append the piano if they already exist - i.e. the MA+ mod has been installed and placed before this one in order.
Please note that I settled for only one exclamation mark now. It's not like it's on fire or anything. :)
« Last Edit: June 25, 2008, 05:57:14 am by Sean Mirrsen »
Logged
Multiworld Madness Archive:
Game One, Discontinued at World 3.
Game Two, Discontinued at World 1.

"Europe has to grow out of the mindset that Europe's problems are the world's problems, but the world's problems are not Europe's problems."
- Subrahmanyam Jaishankar, Minister of External Affairs, India

Sean Mirrsen

  • Bay Watcher
  • Bearer of the Psionic Flame
    • View Profile

Hm. Oh wow, I solved the bodyglosses case. I just couldn't understand where the error was coming from until I remembered just now that the syntax for the creature's bodygloss tag, and the header for the bodygloss entry are the same, and the replace-parser tries to append a new tag to the entry, and crashes.
I patched a loophole for that one, so that if ever the tag name equals the entry header type, the tag is always replaced, not added.

Hm, that's the last known bug squished. It can't be this easy.

I was working on the idea of conditional entry creation.
Let's take a very stupid idea and a very stupid implementation.
Make a "-man" version of every non-mega quadruped creature.

Code: [Select]
[@CREATURE:#_MAN]
[COND:BODY@1&QUADRUPED][COND:MEGABEAST!][COND:SEMIMEGABEAST!][COND:POWER!]
[NAME:#man:@1#men]
[CAN_SPEAK][CAN_LEARN]
[CANOPENDOORS]
[BODY:QUADRUPED!!HUMANOID:##]
[ATTACK:MAIN:BYTYPE:GRASP:punch:punches:1:2:BLUDGEON][ATTACKFLAG_WITH]

The syntax is:
@ in the header marks conditional creation.
# represents a copied string. Any following text is added at the end.
COND tags represent conditions for inclusion. An entry must match all conditions to be referenced for the final result.
@ in COND tags follows a target tag name, and represents a check on a specific argument in a tag, followed by the target argument index (0-based), and either # or &, for exact match or "includes" match of the following string.
! in COND tags follows a target tag name, and represents a check for the absence of a tag, as opposed to checking for presence, when no modifiers are present.
After the COND tags, semi-normal replacement tags are listed.
# in these tags means that a string value is copied from the current value of the target entry, and any following text is added to it.
@ followed by a number means copying a value from another argument in the same tag, and the following modifiers are then applied to that value.
!! in a tag means a value is replaced by another. Optionally, providing a value before the !! will only replace the value if the target entry's value equals that.
## as the last argument of a tag will replace all nonaffected argument values with those taken from the target entry.

Gee, that's a mighty fine gigantic wall of text I made there.

How's the idea sound?
Logged
Multiworld Madness Archive:
Game One, Discontinued at World 3.
Game Two, Discontinued at World 1.

"Europe has to grow out of the mindset that Europe's problems are the world's problems, but the world's problems are not Europe's problems."
- Subrahmanyam Jaishankar, Minister of External Affairs, India

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile

Sounds cool though I may get something wrong (these are obviously easy things but I can just misunderstand something), and for that ## in the body string, does it mean that all the organs after mew humanoid body are fully taken from the vanilla creature?
Also the main question is what does the 1 in the @1#men do?
And the 1st condition... In [@CREATURE:#_MAN], what does it check?
Also where do you exactly define the value of "#"?
Men, I need some explanation ;).
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Sean Mirrsen

  • Bay Watcher
  • Bearer of the Psionic Flame
    • View Profile

@ in the header marks conditional placement. # in the header name means the string will be taken from any matching creatures, and the text following the # will be added to form the new entry name.

## indeed means all organs after those (or if possible, all except those replaced) will be taken from the original creature.

# takes the value from the tag present on the original creature, specifically in the same argument of the same tag as # is used in. [NAME:#:#:#] used when the dog creature is the target, will get the same NAME tag as that of the dog. You can get the same using [NAME:##], but if you're not changing it, you don't need to include it.

"@ in COND tags follows a target tag name, and represents a check on a specific argument in a tag, followed by the target argument index (0-based), and either # or &, for exact match or "includes" match of the following string." means that if you place a @ at the start of a tag argument, the value of the argument will be taken from another argument in the tag, starting at zero for the tag name. So in this case, [NAME:#man:@1#men] applied to [NAME:dog:dogs] will make [NAME:dogman:dogmen]. I actually forgot the third value in the tag, the adjective, but it will in such cases be equal to the first constructed one, "dogman" in this case.

It might actually be possible to do [SPECNAME:FEMALE:NAME@1#girl:NAME@1#girls:NAME@1#girl] to get catgirls and the like... :D

And bear in mind, none of this is possible yet. I'm just theoretizing, basing on previous experiments with conditions and replacement.
« Last Edit: June 25, 2008, 08:06:06 am by Sean Mirrsen »
Logged
Multiworld Madness Archive:
Game One, Discontinued at World 3.
Game Two, Discontinued at World 1.

"Europe has to grow out of the mindset that Europe's problems are the world's problems, but the world's problems are not Europe's problems."
- Subrahmanyam Jaishankar, Minister of External Affairs, India

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile

Well, now it's clear.
However this will need a talented guide-writer, or many people will turn from this in such form.
You'll need a guide which consists of "@ does X and Y in Z" as clear as possible =).
Nice idea. Will you try to make it or "you're just theoretizing"? :)
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Sean Mirrsen

  • Bay Watcher
  • Bearer of the Psionic Flame
    • View Profile

Seeing how bored I am, this will be the next item on the to-do list after I'm done with either of the current two.

As for the syntax - it's not meant to be easily decipherable, rather usable. # always points to the current value except in COND tags where it references a whole string. @ (pronounced "at" btw) points to a different value in the tag, or to a value in another tag, depending on placement.A trailing ! is negation, a !! is replacement, etc, etc. This isn't LUA, so I try to work with what I have.
Logged
Multiworld Madness Archive:
Game One, Discontinued at World 3.
Game Two, Discontinued at World 1.

"Europe has to grow out of the mindset that Europe's problems are the world's problems, but the world's problems are not Europe's problems."
- Subrahmanyam Jaishankar, Minister of External Affairs, India

Sean Mirrsen

  • Bay Watcher
  • Bearer of the Psionic Flame
    • View Profile
Re: Mod Base 0.78a - Moving right along. Further ideas welcome.
« Reply #68 on: June 25, 2008, 08:49:32 am »

Buump-bu-bu-bump-bump-buh-buuump! :)

Aanyways. The new update includes several bug fixes and a handful of new functions, plus a showcase of the upcoming (hopefully) mod editor interface.

One function I forgot to mention - Overwrite tag. Adding [!OVER] as the first tag in an entry will completely overwrite whatever entry was supposed to be edited with the contents of this new one. It's possible to use the replace and overwrite tags together, like this: [!REPLACE:!OVER], but not as two separate tags, and using the other two tags, delete and reference, is impossible with them.
Logged
Multiworld Madness Archive:
Game One, Discontinued at World 3.
Game Two, Discontinued at World 1.

"Europe has to grow out of the mindset that Europe's problems are the world's problems, but the world's problems are not Europe's problems."
- Subrahmanyam Jaishankar, Minister of External Affairs, India

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Mod Base 0.78a - Moving right along. Further ideas welcome.
« Reply #69 on: June 25, 2008, 08:51:52 am »

http://dffd.wimbli.com/file.php?id=251
Mega toy mod [MODBASE] :).
I separated some of the toys in different categories and made them modcomps (i.e. "creatures", "boats", "figurines" etc.).
The Other category hosts everything I was lazy to move/unable to determine.

Also I think it'd be more authentic to call the mods in the first post not "compatible mods" but "additional modbase components". Also you are free to ignore this suggestion without causing any pain to me :).
« Last Edit: June 25, 2008, 08:54:09 am by Deon »
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Ranik

  • Bay Watcher
    • View Profile
Re: Mod Base 0.78a - Moving right along. Further ideas welcome.
« Reply #70 on: June 25, 2008, 09:26:43 am »

By Armok the two of you are fast. I checked this thread yesterday and it seems you've already cranked out a new version and several more "compatible" mods. Anyway I love the work being done with this as I've always been the type to love elements of different mods and had to pick and choose the hard way.
Logged

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Mod Base 0.78a - Moving right along. Further ideas welcome.
« Reply #71 on: June 25, 2008, 09:28:18 am »

http://dffd.wimbli.com/download.php?id=252
A conversion 3-in-1: Botany/Angler/Zoo mod (or in short BAZ), mods which were made by Chariot.

There're 2 interface suggestions:

1. Make a "description" window and add a description text file to the mod folder.


2. Make a new not necessarry tag [AUTHOR:] and let it place author's name in the Modbase Window.
You have on the "grey panel" of the window a free space under the list of included components of the chosen mod. If you don't have it reserved for something it's a perfect place for "Author: ***" string.
Example:
Spoiler (click to show/hide)
By the way, this setup works very fine! I didn't test it with full Martial Arts but I'm sure it works fine too.
Anyway with partial MA (without new entities) I managed to run it smoothly.

Added: I've managed to run the full list of mods. They are fully compatible.

By the way, Sean, could you implement the system to place specified items in EVERY entity but specified?
I.e. for now we should specify [ENTITY:MOUNTAIN] when we want to add a specific item to the entity. And I want you to add something like [ENTITY:!] or [ENTITY:!MOUNTAIN]. In first case it'll look for all entities, in 2nd case it'll ignore dwarves upon item placement.
Is it possible that you'll make it (with possible multi-values like [ENTITY:!EVIL:!SKULLKING] or in 2 raws)? It will allow item mods to be implemented to entities from other mods without a re-writing of the mod code for every new entity. I want to play as dark elves with funny caps from Dwarmin and power toys from I3erent :D.
« Last Edit: June 25, 2008, 10:19:41 am by Deon »
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Mod Base 0.78a - Moving right along. Further ideas welcome.
« Reply #72 on: June 25, 2008, 10:20:43 am »

My final (for now) interface suggestion (you may like it or not).

Spoiler (click to show/hide)

Explanation:
Rep: 0 - mod replaces 0 original files.
Amp: 1 - mod amplifies 1 original file (entity_default.txt for new toys).
Del: 0 - mod deletes 0 original files.

If you manage to do the rep/amp/del system, it'll be possible to make a compatibility check before applying mods. If there's some mod which replaces/deletes some files which are replaced/amplified by other mods, the selection has compatibility problem and BAM a popup appears notifying it (and problematic mods).
« Last Edit: June 25, 2008, 10:33:59 am by Deon »
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Dwarmin

  • Bay Watcher
  • Where do we go from here?
    • View Profile
Re: Mod Base 0.78a - Moving right along. Further ideas welcome.
« Reply #73 on: June 25, 2008, 01:50:15 pm »

Just noticed, glad to see my hat mod getting some use haha
Logged
Dwarmin's fell gaze has fallen upon you. Sadly, Your life and your quest end here, at this sig.

"The hats never coming off."

Sean Mirrsen

  • Bay Watcher
  • Bearer of the Psionic Flame
    • View Profile
Re: Mod Base 0.78a - Moving right along. Further ideas welcome.
« Reply #74 on: June 25, 2008, 02:29:33 pm »

I've been thinking of adding multiconditional append, yes, along the same lines in fact.

As for more details... well, it's possible to add "author" and "description", sure. I'll think on how to add individual module checks.

Btw, do you people get all correct strings with the latest version? Because I think I saw some mangled names here and there, specifically because some "strange symbols" were replaced by even stranger symbols. I saw a table in a world name once. Weird stuff.

edit: In fact, multiconditional append will work exactly like the conditional entry append I described:

[@ENTITY:#]
[COND:ENTITY&PLAINS!][COND:ENTITY&FOREST!]
[WEAPON:ITEM_WEAPON_ANVIL]

Read as "For every "ENTITY" with no "PLAINS" or "FOREST" in any part of the "ENTITY" tag, create an "ENTITY" entry with the name exactly matching the source entry and append "WEAPON:ITEM_WEAPON_ANVIL" to it."
Since entities with the same name are merged, having a set of entities with the same names as other entities will effectively add the anvil to every entity excluding elves, darkelves, humans, and kentaurs.
« Last Edit: June 25, 2008, 02:40:12 pm by Sean Mirrsen »
Logged
Multiworld Madness Archive:
Game One, Discontinued at World 3.
Game Two, Discontinued at World 1.

"Europe has to grow out of the mindset that Europe's problems are the world's problems, but the world's problems are not Europe's problems."
- Subrahmanyam Jaishankar, Minister of External Affairs, India
Pages: 1 ... 3 4 [5] 6 7 ... 21