Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 16 17 [18] 19 20 ... 22

Author Topic: Proposal: a standard format for mods in a diff/patch Mod Starter Pack  (Read 42086 times)

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: Proposal: a standard format for mods in a diff/patch Mod Starter Pack
« Reply #255 on: August 22, 2014, 05:25:28 pm »

So... yeah.  I'm not actually contributing to this project btw guys.  I've got my own reasons for chiming in, even if just as input from a mod merger.  I start school Monday and I don't have time to start on this.  I'm just glad to enjoy the conversational ride.  I hope you continue in setting a good standard for people to build on.

I wanted to call the type of "merging" you guys are proposing as a "blind merge"

I think a term coined term is important, whatever you guys want to call it

[such as... ***cough cough***]
"blind merge"


Something that tells a user/mod merger that the merging process is best done manually [requires updating] to implement features that have been removed/added that need to be expanded to the rest of the entities/creatures/objects in the game in raw [token] format additions/subtractions.

If this wishes to provide that.  Then I would think some regexp fancy magic would need to be implemented.
« Last Edit: August 23, 2014, 08:02:58 am by thistleknot »
Logged

Button

  • Bay Watcher
  • Plants Specialist
    • View Profile
Re: Proposal: a standard format for mods in a diff/patch Mod Starter Pack
« Reply #256 on: August 22, 2014, 05:29:45 pm »

Do we really want to auto-alphabetize everything generally? Some things like gems are kinda convenient if sorted by worth. On the other hand, for stockpiles are clearer when things are in alphabetical order.

Agreeably, second level lags who's order doesn't effect the game at all should be put in a dict/map to make it easy to check for changes to the same token.
Everything?  No.

For the dict/map idea, is there a reason to stop at two levels?  For most structures, it'd be sufficient to soak up all subtokens and just keep them with the parent.  Castes, however, are a major pain in the ass.  Or, they would be if Dwarves had asses.

The only pseudo-simple solution I can think of is to treat caste declarations and caste selections as milestones within the CREATURE object.  A similar tag on the other side of such a milestone is considered a different tag rather than a duplicate one.  This will keep the caste-level tags from overwriting each other without requiring an exhaustive list of caste-level tags.

Castes are going to be somewhat exhausting since they don't need to be declared before they happen. I'm thinking the best way to do them will probably be with two passes: first, find the castes; second, go through the raw in order and for all caste-level tokens not assigned to a caste explicitly, assign it to all the castes you found earlier. (This would of course require a file defining all caste-level tokens, so we know what to do that with.) The output raws would be significantly larger than the input raws, but separating out the all-caste tokens onto each caste individually seems to me to be the  way to prevent specific-caste mods from cocking everything up.

However, I don't think we'd need to put it into the lookup. Since all the different types of RawObjects have different requirements/formats for their individual needs, I figured we'd use good ol' polymorphism to handle the differences between object formats.
Logged
I used to work on Modest Mod and Plant Fixes.

Always assume I'm not seriously back

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: Proposal: a standard format for mods in a diff/patch Mod Starter Pack
« Reply #257 on: August 22, 2014, 07:07:49 pm »

I look forward to learning enough to contribute to these discussions - my first programming course just covered lists, and while I've been reading ahead I'm not quite up to this yet :P
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

Roses

  • Bay Watcher
    • View Profile
Re: Proposal: a standard format for mods in a diff/patch Mod Starter Pack
« Reply #258 on: August 22, 2014, 09:31:04 pm »

Honestly if I were working on this I would start with a program that just divided the raws into dictionaries that would be easy to check against eachother. For example:

  • Create object type dictionary (e.g. CREATURE)
  • Create sub dictionary for each creature (e.g. TOAD)
  • Read raws from top to bottom, placing each entry into the dictionary for specific creature (e.g. MAXAGE:70:100)
  • If you hit a certain token (like USE_MATERIAL_TEMPLATE, SELECT_TISSUE_LAYER, or, the big one, CASTE) create a sub-sub dictionary for that tag
  • Continue adding to the sub-sub dictionary until you hit a token that exits out of it (e.g. another CASTE or USE_MATERIAL_TEMPLATE etc...)
Viola, now you have a dictionary that you can just compare to another dictionary and if it has extra entries or less entries you can adjust your output accordingly. An advantage to this is you can also specify exactly how you want the output to look, so you could, for instance, output into a broken up structure that is more easy to read like
Code: [Select]
[CREATURE:FANTASY_DRAGON_ANCIENT]
[NAME:ancient dragon:ancient dragons:ancient dragon]
[CREATURE_TILE:255][COLOR:7:0:1]

===== BIOME AND NUMBERS
[BIOME:ANY_LAND]
[APPLY_CREATURE_VARIATION:POP_NUMBERS:1:3:1:1:5]

===== MEGABEAST INFO
[MEGABEAST]
[DIFFICULTY:11]
[ATTACK_TRIGGER:120:50000:1000000]
[SPHERE:FIRE]
[SPHERE:EARTH]
[SPHERE:SKY]
[SPHERE:MOUNTAINS]
[SPHERE:LIGHTNING]
[SPHERE:STORMS]
[SPHERE:RULERSHIP]

===== IMMUNITIES
[APPLY_CREATURE_VARIATION:IMMUNITIES_MEGABEAST]

===== TRAITS
[APPLY_CREATURE_VARIATION:TRAITS_MEGABEAST]
[APPLY_CREATURE_VARIATION:TRAITS_COLOSSAL]

[PETVALUE:15000]
[PET_EXOTIC]
[INTELLIGENT]
[TRAINABLE]
[MOUNT]
[FLIER]
[LARGE_PREDATOR]
[BONECARN]
[ALL_ACTIVE]
[SWIMS_INNATE]
[CHILD:0]

[PREFSTRING:unfathomable power]

===== SIZE, AGE, AND SPEED
[BODY_SIZE:0:0:2000000]
[BODY_SIZE:1000:0:2000000000]
[BODY_SIZE:10000:0:2100000000]
[APPLY_CREATURE_VARIATION:STANDARD_FLYING_GAITS:900:528:352:176:1900:2900] 50 kph
[APPLY_CREATURE_VARIATION:STANDARD_QUADRUPED_GAITS:900:711:521:293:1900:2900] 30 kph
[APPLY_CREATURE_VARIATION:STANDARD_SWIMMING_GAITS:2206:1692:1178:585:3400:4900] 15 kph
[APPLY_CREATURE_VARIATION:STANDARD_CLIMBING_GAITS:2206:1692:1178:585:3400:4900] 15 kph
[APPLY_CREATURE_VARIATION:STANDARD_CRAWLING_GAITS:2206:1692:1178:585:3400:4900] 15 kph

===== SENSES
[VIEWRANGE:#] -- default 20
[LOW_LIGHT_VISION:#] -- highest 10000, default 0
[VISION_ARC:#:#]

[ODOR_LEVEL:#] -- default 50
[SMELL_TRIGGER:#] -- no smell 10000, default 50

===== CREATURE CLASSES
[CREATURE_CLASS:ELEMENTAL_WARD]
[CREATURE_CLASS:MAGIC_RESIST]
[CREATURE_CLASS:MEGABEAST]
[CREATURE_CLASS:DRAGON]
[CREATURE_CLASS:COLOSSAL]

===== LAIR AND HABIT
[LAIR:SHRINE:100]
[LAIR_HUNTER]
[HABIT_NUM:TEST_ALL]
[HABIT:GIANT_NEST:100]

===== BODY
[BODY:DRAGON:ATTACHMENT_HEAD_4HORNS:ATTACHMENT_LIMBS_SPIKESLEG:ATTACHMENT_MISC_SPIKESTAIL]
[BODYGLOSS:CLAW_FOOT]
[BODY_DETAIL_PLAN:MATERIALS_LEVEL_9]
[REMOVE_MATERIAL:HAIR]
[USE_MATERIAL_TEMPLATE:SCALE:SCALE_TEMPLATE_LEVEL_9]
[USE_MATERIAL_TEMPLATE:TALON:NAIL_TEMPLATE_LEVEL_5]
[USE_MATERIAL_TEMPLATE:HORN:HORN_TEMPLATE_LEVEL_5]
[USE_MATERIAL_TEMPLATE:SPIKE:SPIKE_TEMPLATE_LEVEL_5]
[BODY_DETAIL_PLAN:TISSUES_LEVEL_9]
[REMOVE_TISSUE:HAIR]
[USE_TISSUE_TEMPLATE:SCALE:SCALE_TEMPLATE_LEVEL_9]
[USE_TISSUE_TEMPLATE:TALON:CLAW_TEMPLATE_LEVEL_5]
[USE_TISSUE_TEMPLATE:HORN:HORN_TEMPLATE_LEVEL_5]
[USE_TISSUE_TEMPLATE:SPIKE:SPIKE_TEMPLATE_LEVEL_5]
[BODY_DETAIL_PLAN:VERTEBRATE_TISSUE_LAYERS:SCALE:FAT:MUSCLE:BONE:CARTILAGE]
[TISSUE_LAYER:BY_CATEGORY:TOE:TALON:FRONT]
[SELECT_TISSUE_LAYER:HEART:BY_CATEGORY:HEART]
[PLUS_TISSUE_LAYER:SCALE:BY_CATEGORY:THROAT]
[TL_MAJOR_ARTERIES]
[BODY_DETAIL_PLAN:STANDARD_HEAD_POSITIONS]
[BODY_DETAIL_PLAN:HUMANOID_RIBCAGE_POSITIONS]
[USE_MATERIAL_TEMPLATE:SINEW:SINEW_TEMPLATE]
[TENDONS:LOCAL_CREATURE_MAT:SINEW:200]
[LIGAMENTS:LOCAL_CREATURE_MAT:SINEW:200]
[USE_MATERIAL_TEMPLATE:BLOOD:BLOOD_TEMPLATE]
[BLOOD:LOCAL_CREATURE_MAT:BLOOD:LIQUID]
[USE_MATERIAL_TEMPLATE:PUS:PUS_TEMPLATE]
[PUS:LOCAL_CREATURE_MAT:PUS:LIQUID]
[HAS_NERVES]
[GETS_WOUND_INFECTIONS]
[GETS_INFECTIONS_FROM_ROT]
[SELECT_TISSUE:SCALE]
[RELATIVE_THICKNESS:8]
[BODY_APPEARANCE_MODIFIER:LENGTH:90:95:98:100:102:105:110]
[BODY_APPEARANCE_MODIFIER:HEIGHT:90:95:98:100:102:105:110]
[BODY_APPEARANCE_MODIFIER:BROADNESS:90:95:98:100:102:105:110]

===== ATTRIBUTES AND SKILLS
[PHYS_ATT_RANGE:STRENGTH:4000:4100:4200:4500:4800:4900:5000]
[PHYS_ATT_RANGE:AGILITY:3000:3100:3200:3500:3800:3900:4000]
[PHYS_ATT_RANGE:TOUGHNESS:3500:3600:3700:4000:4300:4400:4500]
[PHYS_ATT_RANGE:ENDURANCE:3500:3600:3700:4000:4300:4400:4500]
[PHYS_ATT_RANGE:DISEASE_RESISTANCE:4000:4100:4200:4500:4800:4900:5000]
[PHYS_ATT_RANGE:RECUPERATION:3000:3100:3200:3500:3800:3900:4000]

[MENT_ATT_RANGE:WILLPOWER:5000:5000:5000:5000:5000:5000:5000]
[MENT_ATT_RANGE:SPATIAL_SENSE:3500:3600:3700:4000:4300:4400:4500]
[MENT_ATT_RANGE:KINESTHETIC_SENSE:5000:5000:5000:5000:5000:5000:5000]
[MENT_ATT_RANGE:FOCUS:5000:5000:5000:5000:5000:5000:5000]

[NATURAL_SKILL:BITE:12]
[NATURAL_SKILL:GRASP_STRIKE:12]
[NATURAL_SKILL:STANCE_STRIKE:12]
[NATURAL_SKILL:MELEE_COMBAT:12]
[NATURAL_SKILL:SITUATIONAL_AWARENESS:12]
[NATURAL_SKILL:DISCIPLINE:12]

===== ATTACKS
[APPLY_CREATURE_VARIATION:ATTACK_BITE]
[APPLY_CREATURE_VARIATION:ATTACK_TAIL_SWIPE]
[APPLY_CREATURE_VARIATION:ATTACK_CLAW]
[APPLY_CREATURE_VARIATION:ATTACK_HORN]
[APPLY_CREATURE_VARIATION:ATTACK_SPIKE]
[APPLY_CREATURE_VARIATION:SPECIAL_ATTACK_WING_BUFFET_COLOSSAL]
[APPLY_CREATURE_VARIATION:SPECIAL_ATTACK_STOMP_COLOSSAL]
[APPLY_CREATURE_VARIATION:SPECIAL_ATTACK_TAIL_SWEEP_COLOSSAL]
[APPLY_CREATURE_VARIATION:SPECIAL_ATTACK_CLEAVE_CLAW_COLOSSAL]
[APPLY_CREATURE_VARTIAION:SPECIAL_ATTACK_IMPALE_HORN_COLOSSAL]

===== CASTES
[CASTE:FEMALE_RED]
[FEMALE]
[LAYS_EGGS]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:EGGSHELL:SOLID]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:EGG_WHITE:LIQUID]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:EGG_YOLK:LIQUID]
[EGG_SIZE:400000]
[CLUTCH_SIZE:1:2]
[CASTE:MALE_RED]
[MALE]
[CASTE:FEMALE_BLUE]
[FEMALE]
[LAYS_EGGS]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:EGGSHELL:SOLID]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:EGG_WHITE:LIQUID]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:EGG_YOLK:LIQUID]
[EGG_SIZE:400000]
[CLUTCH_SIZE:1:2]
[CASTE:MALE_BLUE]
[MALE]
[CASTE:FEMALE_WHITE]
[FEMALE]
[LAYS_EGGS]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:EGGSHELL:SOLID]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:EGG_WHITE:LIQUID]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:EGG_YOLK:LIQUID]
[EGG_SIZE:400000]
[CLUTCH_SIZE:1:2]
[CASTE:MALE_WHITE]
[MALE]
[CASTE:FEMALE_BROWN]
[FEMALE]
[LAYS_EGGS]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:EGGSHELL:SOLID]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:EGG_WHITE:LIQUID]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:EGG_YOLK:LIQUID]
[EGG_SIZE:400000]
[CLUTCH_SIZE:1:2]
[CASTE:MALE_BROWN]
[MALE]

===== CASTE DETAILS
[SELECT_CASTE:FEMALE_RED]
[SELECT_ADDITIONAL_CASTE:MALE_RED]
[DESCRIPTION:Very few ancient dragons exist today. These dragons are the original members of the elder race that has gone all but extinct. Those that do still exist are the ones that were in the middle of the breach when it closed. It is said that half of the mind of these once noble creatures was left in the other realm and now they are little more than intelligent beasts who rule the skies. Red - The red dragons are masters of fire.]
[CASTE_NAME:ancient red dragon:ancient red dragons:ancient red dragon]
[FIREIMMUNE_SUPER]

===== CASTE CLASSES
[CREATURE_CLASS:FIRE4]

===== CASTE INTERACTIONS
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_FIRE_FIRE_JET]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_FIRE_FIREBALL]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_FIRE_FLAME_BLAST]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_FIRE_INCINERATE]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_FIRE_DRAGON_FIRE]

===== CASTE TISSUE LAYER GROUPS
[SET_TL_GROUP:BY_CATEGORY:ALL:SCALE]
[TL_COLOR_MODIFIER:RED:1:CRIMSON:1:CARMINE:1]
[TLCM_NOUN:scales:PLURAL]
[SET_TL_GROUP:BY_CATEGORY:EYE:EYE]
[TL_COLOR_MODIFIER:BLACK:1]
[TLCM_NOUN:eyes:PLURAL]

===== CASTE DETAILS
[SELECT_CASTE:FEMALE_BLUE]
[SELECT_ADDITIONAL_CASTE:MALE_BLUE]
[DESCRIPTION:Very few ancient dragons exist today. These dragons are the original members of the elder race that has gone all but extinct. Those that do still exist are the ones that were in the middle of the breach when it closed. It is said that half of the mind of these once noble creatures was left in the other realm and now they are little more than intelligent beasts who rule the skies. Blue - The blue dragons are masters of ice.]
[CASTE_NAME:ancient blue dragon:ancient blue dragons:ancient blue dragon]

===== CASTE CLASSES
[CREATURE_CLASS:ICE4]

===== CASTE INTERACTIONS
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_ICE_ICICLE]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_ICE_COLD_SNAP]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_ICE_RAY_OF_FROST]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_ICE_FREEZE]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_ICE_FROST_NOVA]

===== CASTE TISSUE LAYER GROUPS
[SET_TL_GROUP:BY_CATEGORY:ALL:SCALE]
[TL_COLOR_MODIFIER:AZURE:1:AQUA:1:COBALT:1:CERULEAN:1:MIDNIGHT_BLUE:1]
[TLCM_NOUN:scales:PLURAL]
[SET_TL_GROUP:BY_CATEGORY:EYE:EYE]
[TL_COLOR_MODIFIER:BLACK:1]
[TLCM_NOUN:eyes:PLURAL]

===== CASTE DETAILS
[SELECT_CASTE:FEMALE_WHITE]
[SELECT_ADDITIONAL_CASTE:MALE_WHITE]
[DESCRIPTION:Very few ancient dragons exist today. These dragons are the original members of the elder race that has gone all but extinct. Those that do still exist are the ones that were in the middle of the breach when it closed. It is said that half of the mind of these once noble creatures was left in the other realm and now they are little more than intelligent beasts who rule the skies. White - The white dragons are masters of air]
[CASTE_NAME:ancient white dragon:ancient white dragons:ancient white dragon]

===== CASTE CLASSES
[CREATURE_CLASS:AIR4]

===== CASTE INTERACTIONS
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_AIR_LIGHTNING]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_AIR_CHAIN_LIGHTNING]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_AIR_SHOCK]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_AIR_GUST]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_AIR_CYCLONE]

===== CASTE TISSUE LAYER GROUPS
[SET_TL_GROUP:BY_CATEGORY:ALL:SCALE]
[TL_COLOR_MODIFIER:WHITE:1:IVORY:1]
[TLCM_NOUN:scales:PLURAL]
[SET_TL_GROUP:BY_CATEGORY:EYE:EYE]
[TL_COLOR_MODIFIER:BLACK:1]
[TLCM_NOUN:eyes:PLURAL]

===== CASTE DETAILS
[SELECT_CASTE:FEMALE_BROWN]
[SELECT_ADDITIONAL_CASTE:MALE_BROWN]
[DESCRIPTION:Very few ancient dragons exist today. These dragons are the original members of the elder race that has gone all but extinct. Those that do still exist are the ones that were in the middle of the breach when it closed. It is said that half of the mind of these once noble creatures was left in the other realm and now they are little more than intelligent beasts who rule the skies. Brown - The brown dragons are masters of earth.]
[CASTE_NAME:ancient brown dragon:ancient brown dragons:ancient brown dragon]

===== CASTE CLASSES
[CREATURE_CLASS:EARTH4]

===== CASTE INTERACTIONS
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_EARTH_BOULDER]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_EARTH_STALAGMITE]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_EARTH_SAND_STORM]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_EARTH_PETRIFY]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_EARTH_EARTHQUAKE]

===== CASTE TISSUE LAYER GROUPS
[SET_TL_GROUP:BY_CATEGORY:ALL:SCALE]
[TL_COLOR_MODIFIER:BROWN:1:DARK_BROWN:1:LIGHT_BROWN:1]
[TLCM_NOUN:scales:PLURAL]
[SET_TL_GROUP:BY_CATEGORY:EYE:EYE]
[TL_COLOR_MODIFIER:BLACK:1]
[TLCM_NOUN:eyes:PLURAL]

===== MISC
[SELECT_CASTE:ALL]
[SELECT_MATERIAL:ALL]
[MULTIPLY_VALUE:25]
[COLDDAM_POINT:NONE]
[HEATDAM_POINT:NONE]
[IGNITE_POINT:NONE]
[IF_EXISTS_SET_MELTING_POINT:55000]
[IF_EXISTS_SET_BOILING_POINT:57000]
[SPEC_HEAT:30000]
[SELECT_MATERIAL:BLOOD]
[PLUS_MATERIAL:PUS]
[MELTING_POINT:10000]
[EXTRA_BUTCHER_OBJECT:BY_TOKEN:HEART]
[EBO_ITEM:TOOL:ITEM_TOOL_CREATURE_HEART_DRAGON_ANCIENT:NONE:NONE]
[EXTRA_BUTCHER_OBJECT:BY_TOKEN:BRAIN]
[EBO_ITEM:SMALLGEM:NONE:INORGANIC:SOUL_GEM_DRAGON_ANCIENT]
That would be my suggestion.
Logged

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Proposal: a standard format for mods in a diff/patch Mod Starter Pack
« Reply #259 on: August 22, 2014, 10:16:42 pm »

Honestly if I were working on this I would start with a program that just divided the raws into dictionaries that would be easy to check against eachother. For example:

  • Create object type dictionary (e.g. CREATURE)
  • Create sub dictionary for each creature (e.g. TOAD)
  • Read raws from top to bottom, placing each entry into the dictionary for specific creature (e.g. MAXAGE:70:100)
  • If you hit a certain token (like USE_MATERIAL_TEMPLATE, SELECT_TISSUE_LAYER, or, the big one, CASTE) create a sub-sub dictionary for that tag
  • Continue adding to the sub-sub dictionary until you hit a token that exits out of it (e.g. another CASTE or USE_MATERIAL_TEMPLATE etc...)
Viola, now you have a dictionary that you can just compare to another dictionary and if it has extra entries or less entries you can adjust your output accordingly. An advantage to this is you can also specify exactly how you want the output to look, so you could, for instance, output into a broken up structure that is more easy to read like
Code: [Select]
[CREATURE:FANTASY_DRAGON_ANCIENT]
[NAME:ancient dragon:ancient dragons:ancient dragon]
[CREATURE_TILE:255][COLOR:7:0:1]

===== BIOME AND NUMBERS
[BIOME:ANY_LAND]
[APPLY_CREATURE_VARIATION:POP_NUMBERS:1:3:1:1:5]

===== MEGABEAST INFO
[MEGABEAST]
[DIFFICULTY:11]
[ATTACK_TRIGGER:120:50000:1000000]
[SPHERE:FIRE]
[SPHERE:EARTH]
[SPHERE:SKY]
[SPHERE:MOUNTAINS]
[SPHERE:LIGHTNING]
[SPHERE:STORMS]
[SPHERE:RULERSHIP]

===== IMMUNITIES
[APPLY_CREATURE_VARIATION:IMMUNITIES_MEGABEAST]

===== TRAITS
[APPLY_CREATURE_VARIATION:TRAITS_MEGABEAST]
[APPLY_CREATURE_VARIATION:TRAITS_COLOSSAL]

[PETVALUE:15000]
[PET_EXOTIC]
[INTELLIGENT]
[TRAINABLE]
[MOUNT]
[FLIER]
[LARGE_PREDATOR]
[BONECARN]
[ALL_ACTIVE]
[SWIMS_INNATE]
[CHILD:0]

[PREFSTRING:unfathomable power]

===== SIZE, AGE, AND SPEED
[BODY_SIZE:0:0:2000000]
[BODY_SIZE:1000:0:2000000000]
[BODY_SIZE:10000:0:2100000000]
[APPLY_CREATURE_VARIATION:STANDARD_FLYING_GAITS:900:528:352:176:1900:2900] 50 kph
[APPLY_CREATURE_VARIATION:STANDARD_QUADRUPED_GAITS:900:711:521:293:1900:2900] 30 kph
[APPLY_CREATURE_VARIATION:STANDARD_SWIMMING_GAITS:2206:1692:1178:585:3400:4900] 15 kph
[APPLY_CREATURE_VARIATION:STANDARD_CLIMBING_GAITS:2206:1692:1178:585:3400:4900] 15 kph
[APPLY_CREATURE_VARIATION:STANDARD_CRAWLING_GAITS:2206:1692:1178:585:3400:4900] 15 kph

===== SENSES
[VIEWRANGE:#] -- default 20
[LOW_LIGHT_VISION:#] -- highest 10000, default 0
[VISION_ARC:#:#]

[ODOR_LEVEL:#] -- default 50
[SMELL_TRIGGER:#] -- no smell 10000, default 50

===== CREATURE CLASSES
[CREATURE_CLASS:ELEMENTAL_WARD]
[CREATURE_CLASS:MAGIC_RESIST]
[CREATURE_CLASS:MEGABEAST]
[CREATURE_CLASS:DRAGON]
[CREATURE_CLASS:COLOSSAL]

===== LAIR AND HABIT
[LAIR:SHRINE:100]
[LAIR_HUNTER]
[HABIT_NUM:TEST_ALL]
[HABIT:GIANT_NEST:100]

===== BODY
[BODY:DRAGON:ATTACHMENT_HEAD_4HORNS:ATTACHMENT_LIMBS_SPIKESLEG:ATTACHMENT_MISC_SPIKESTAIL]
[BODYGLOSS:CLAW_FOOT]
[BODY_DETAIL_PLAN:MATERIALS_LEVEL_9]
[REMOVE_MATERIAL:HAIR]
[USE_MATERIAL_TEMPLATE:SCALE:SCALE_TEMPLATE_LEVEL_9]
[USE_MATERIAL_TEMPLATE:TALON:NAIL_TEMPLATE_LEVEL_5]
[USE_MATERIAL_TEMPLATE:HORN:HORN_TEMPLATE_LEVEL_5]
[USE_MATERIAL_TEMPLATE:SPIKE:SPIKE_TEMPLATE_LEVEL_5]
[BODY_DETAIL_PLAN:TISSUES_LEVEL_9]
[REMOVE_TISSUE:HAIR]
[USE_TISSUE_TEMPLATE:SCALE:SCALE_TEMPLATE_LEVEL_9]
[USE_TISSUE_TEMPLATE:TALON:CLAW_TEMPLATE_LEVEL_5]
[USE_TISSUE_TEMPLATE:HORN:HORN_TEMPLATE_LEVEL_5]
[USE_TISSUE_TEMPLATE:SPIKE:SPIKE_TEMPLATE_LEVEL_5]
[BODY_DETAIL_PLAN:VERTEBRATE_TISSUE_LAYERS:SCALE:FAT:MUSCLE:BONE:CARTILAGE]
[TISSUE_LAYER:BY_CATEGORY:TOE:TALON:FRONT]
[SELECT_TISSUE_LAYER:HEART:BY_CATEGORY:HEART]
[PLUS_TISSUE_LAYER:SCALE:BY_CATEGORY:THROAT]
[TL_MAJOR_ARTERIES]
[BODY_DETAIL_PLAN:STANDARD_HEAD_POSITIONS]
[BODY_DETAIL_PLAN:HUMANOID_RIBCAGE_POSITIONS]
[USE_MATERIAL_TEMPLATE:SINEW:SINEW_TEMPLATE]
[TENDONS:LOCAL_CREATURE_MAT:SINEW:200]
[LIGAMENTS:LOCAL_CREATURE_MAT:SINEW:200]
[USE_MATERIAL_TEMPLATE:BLOOD:BLOOD_TEMPLATE]
[BLOOD:LOCAL_CREATURE_MAT:BLOOD:LIQUID]
[USE_MATERIAL_TEMPLATE:PUS:PUS_TEMPLATE]
[PUS:LOCAL_CREATURE_MAT:PUS:LIQUID]
[HAS_NERVES]
[GETS_WOUND_INFECTIONS]
[GETS_INFECTIONS_FROM_ROT]
[SELECT_TISSUE:SCALE]
[RELATIVE_THICKNESS:8]
[BODY_APPEARANCE_MODIFIER:LENGTH:90:95:98:100:102:105:110]
[BODY_APPEARANCE_MODIFIER:HEIGHT:90:95:98:100:102:105:110]
[BODY_APPEARANCE_MODIFIER:BROADNESS:90:95:98:100:102:105:110]

===== ATTRIBUTES AND SKILLS
[PHYS_ATT_RANGE:STRENGTH:4000:4100:4200:4500:4800:4900:5000]
[PHYS_ATT_RANGE:AGILITY:3000:3100:3200:3500:3800:3900:4000]
[PHYS_ATT_RANGE:TOUGHNESS:3500:3600:3700:4000:4300:4400:4500]
[PHYS_ATT_RANGE:ENDURANCE:3500:3600:3700:4000:4300:4400:4500]
[PHYS_ATT_RANGE:DISEASE_RESISTANCE:4000:4100:4200:4500:4800:4900:5000]
[PHYS_ATT_RANGE:RECUPERATION:3000:3100:3200:3500:3800:3900:4000]

[MENT_ATT_RANGE:WILLPOWER:5000:5000:5000:5000:5000:5000:5000]
[MENT_ATT_RANGE:SPATIAL_SENSE:3500:3600:3700:4000:4300:4400:4500]
[MENT_ATT_RANGE:KINESTHETIC_SENSE:5000:5000:5000:5000:5000:5000:5000]
[MENT_ATT_RANGE:FOCUS:5000:5000:5000:5000:5000:5000:5000]

[NATURAL_SKILL:BITE:12]
[NATURAL_SKILL:GRASP_STRIKE:12]
[NATURAL_SKILL:STANCE_STRIKE:12]
[NATURAL_SKILL:MELEE_COMBAT:12]
[NATURAL_SKILL:SITUATIONAL_AWARENESS:12]
[NATURAL_SKILL:DISCIPLINE:12]

===== ATTACKS
[APPLY_CREATURE_VARIATION:ATTACK_BITE]
[APPLY_CREATURE_VARIATION:ATTACK_TAIL_SWIPE]
[APPLY_CREATURE_VARIATION:ATTACK_CLAW]
[APPLY_CREATURE_VARIATION:ATTACK_HORN]
[APPLY_CREATURE_VARIATION:ATTACK_SPIKE]
[APPLY_CREATURE_VARIATION:SPECIAL_ATTACK_WING_BUFFET_COLOSSAL]
[APPLY_CREATURE_VARIATION:SPECIAL_ATTACK_STOMP_COLOSSAL]
[APPLY_CREATURE_VARIATION:SPECIAL_ATTACK_TAIL_SWEEP_COLOSSAL]
[APPLY_CREATURE_VARIATION:SPECIAL_ATTACK_CLEAVE_CLAW_COLOSSAL]
[APPLY_CREATURE_VARTIAION:SPECIAL_ATTACK_IMPALE_HORN_COLOSSAL]

===== CASTES
[CASTE:FEMALE_RED]
[FEMALE]
[LAYS_EGGS]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:EGGSHELL:SOLID]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:EGG_WHITE:LIQUID]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:EGG_YOLK:LIQUID]
[EGG_SIZE:400000]
[CLUTCH_SIZE:1:2]
[CASTE:MALE_RED]
[MALE]
[CASTE:FEMALE_BLUE]
[FEMALE]
[LAYS_EGGS]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:EGGSHELL:SOLID]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:EGG_WHITE:LIQUID]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:EGG_YOLK:LIQUID]
[EGG_SIZE:400000]
[CLUTCH_SIZE:1:2]
[CASTE:MALE_BLUE]
[MALE]
[CASTE:FEMALE_WHITE]
[FEMALE]
[LAYS_EGGS]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:EGGSHELL:SOLID]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:EGG_WHITE:LIQUID]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:EGG_YOLK:LIQUID]
[EGG_SIZE:400000]
[CLUTCH_SIZE:1:2]
[CASTE:MALE_WHITE]
[MALE]
[CASTE:FEMALE_BROWN]
[FEMALE]
[LAYS_EGGS]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:EGGSHELL:SOLID]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:EGG_WHITE:LIQUID]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:EGG_YOLK:LIQUID]
[EGG_SIZE:400000]
[CLUTCH_SIZE:1:2]
[CASTE:MALE_BROWN]
[MALE]

===== CASTE DETAILS
[SELECT_CASTE:FEMALE_RED]
[SELECT_ADDITIONAL_CASTE:MALE_RED]
[DESCRIPTION:Very few ancient dragons exist today. These dragons are the original members of the elder race that has gone all but extinct. Those that do still exist are the ones that were in the middle of the breach when it closed. It is said that half of the mind of these once noble creatures was left in the other realm and now they are little more than intelligent beasts who rule the skies. Red - The red dragons are masters of fire.]
[CASTE_NAME:ancient red dragon:ancient red dragons:ancient red dragon]
[FIREIMMUNE_SUPER]

===== CASTE CLASSES
[CREATURE_CLASS:FIRE4]

===== CASTE INTERACTIONS
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_FIRE_FIRE_JET]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_FIRE_FIREBALL]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_FIRE_FLAME_BLAST]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_FIRE_INCINERATE]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_FIRE_DRAGON_FIRE]

===== CASTE TISSUE LAYER GROUPS
[SET_TL_GROUP:BY_CATEGORY:ALL:SCALE]
[TL_COLOR_MODIFIER:RED:1:CRIMSON:1:CARMINE:1]
[TLCM_NOUN:scales:PLURAL]
[SET_TL_GROUP:BY_CATEGORY:EYE:EYE]
[TL_COLOR_MODIFIER:BLACK:1]
[TLCM_NOUN:eyes:PLURAL]

===== CASTE DETAILS
[SELECT_CASTE:FEMALE_BLUE]
[SELECT_ADDITIONAL_CASTE:MALE_BLUE]
[DESCRIPTION:Very few ancient dragons exist today. These dragons are the original members of the elder race that has gone all but extinct. Those that do still exist are the ones that were in the middle of the breach when it closed. It is said that half of the mind of these once noble creatures was left in the other realm and now they are little more than intelligent beasts who rule the skies. Blue - The blue dragons are masters of ice.]
[CASTE_NAME:ancient blue dragon:ancient blue dragons:ancient blue dragon]

===== CASTE CLASSES
[CREATURE_CLASS:ICE4]

===== CASTE INTERACTIONS
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_ICE_ICICLE]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_ICE_COLD_SNAP]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_ICE_RAY_OF_FROST]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_ICE_FREEZE]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_ICE_FROST_NOVA]

===== CASTE TISSUE LAYER GROUPS
[SET_TL_GROUP:BY_CATEGORY:ALL:SCALE]
[TL_COLOR_MODIFIER:AZURE:1:AQUA:1:COBALT:1:CERULEAN:1:MIDNIGHT_BLUE:1]
[TLCM_NOUN:scales:PLURAL]
[SET_TL_GROUP:BY_CATEGORY:EYE:EYE]
[TL_COLOR_MODIFIER:BLACK:1]
[TLCM_NOUN:eyes:PLURAL]

===== CASTE DETAILS
[SELECT_CASTE:FEMALE_WHITE]
[SELECT_ADDITIONAL_CASTE:MALE_WHITE]
[DESCRIPTION:Very few ancient dragons exist today. These dragons are the original members of the elder race that has gone all but extinct. Those that do still exist are the ones that were in the middle of the breach when it closed. It is said that half of the mind of these once noble creatures was left in the other realm and now they are little more than intelligent beasts who rule the skies. White - The white dragons are masters of air]
[CASTE_NAME:ancient white dragon:ancient white dragons:ancient white dragon]

===== CASTE CLASSES
[CREATURE_CLASS:AIR4]

===== CASTE INTERACTIONS
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_AIR_LIGHTNING]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_AIR_CHAIN_LIGHTNING]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_AIR_SHOCK]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_AIR_GUST]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_AIR_CYCLONE]

===== CASTE TISSUE LAYER GROUPS
[SET_TL_GROUP:BY_CATEGORY:ALL:SCALE]
[TL_COLOR_MODIFIER:WHITE:1:IVORY:1]
[TLCM_NOUN:scales:PLURAL]
[SET_TL_GROUP:BY_CATEGORY:EYE:EYE]
[TL_COLOR_MODIFIER:BLACK:1]
[TLCM_NOUN:eyes:PLURAL]

===== CASTE DETAILS
[SELECT_CASTE:FEMALE_BROWN]
[SELECT_ADDITIONAL_CASTE:MALE_BROWN]
[DESCRIPTION:Very few ancient dragons exist today. These dragons are the original members of the elder race that has gone all but extinct. Those that do still exist are the ones that were in the middle of the breach when it closed. It is said that half of the mind of these once noble creatures was left in the other realm and now they are little more than intelligent beasts who rule the skies. Brown - The brown dragons are masters of earth.]
[CASTE_NAME:ancient brown dragon:ancient brown dragons:ancient brown dragon]

===== CASTE CLASSES
[CREATURE_CLASS:EARTH4]

===== CASTE INTERACTIONS
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_EARTH_BOULDER]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_EARTH_STALAGMITE]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_EARTH_SAND_STORM]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_EARTH_PETRIFY]
[APPLY_CREATURE_VARIATION:SPELL_ELEMENTAL_EARTH_EARTHQUAKE]

===== CASTE TISSUE LAYER GROUPS
[SET_TL_GROUP:BY_CATEGORY:ALL:SCALE]
[TL_COLOR_MODIFIER:BROWN:1:DARK_BROWN:1:LIGHT_BROWN:1]
[TLCM_NOUN:scales:PLURAL]
[SET_TL_GROUP:BY_CATEGORY:EYE:EYE]
[TL_COLOR_MODIFIER:BLACK:1]
[TLCM_NOUN:eyes:PLURAL]

===== MISC
[SELECT_CASTE:ALL]
[SELECT_MATERIAL:ALL]
[MULTIPLY_VALUE:25]
[COLDDAM_POINT:NONE]
[HEATDAM_POINT:NONE]
[IGNITE_POINT:NONE]
[IF_EXISTS_SET_MELTING_POINT:55000]
[IF_EXISTS_SET_BOILING_POINT:57000]
[SPEC_HEAT:30000]
[SELECT_MATERIAL:BLOOD]
[PLUS_MATERIAL:PUS]
[MELTING_POINT:10000]
[EXTRA_BUTCHER_OBJECT:BY_TOKEN:HEART]
[EBO_ITEM:TOOL:ITEM_TOOL_CREATURE_HEART_DRAGON_ANCIENT:NONE:NONE]
[EXTRA_BUTCHER_OBJECT:BY_TOKEN:BRAIN]
[EBO_ITEM:SMALLGEM:NONE:INORGANIC:SOUL_GEM_DRAGON_ANCIENT]
That would be my suggestion.

I think the technical name for that approach is "scope creep."  This sounds like a decent avenue to pursue, but not for a first version.  False-positive rejects are fine since the intended audience is newbs who will probably only load mods pre-loaded with the Starter Pack.  That handful can have their compatibility worked out in manifest files if absolutely necessary.

Once the idea of merge-in mods takes off, more intelligent parsing will be far more valuable.  The important thing for now is to make sure we don't make design decisions that tie our hands down the road.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: Proposal: a standard format for mods in a diff/patch Mod Starter Pack
« Reply #260 on: August 22, 2014, 10:50:10 pm »

Honestly if I were working on this I would start with a program that just divided the raws into dictionaries that would be easy to check against each other. For example:
  • Create object type dictionary (e.g. CREATURE)
  • Create sub dictionary for each creature (e.g. TOAD)
  • Read raws from top to bottom, placing each entry into the dictionary for specific creature (e.g. MAXAGE:70:100)
  • If you hit a certain token (like USE_MATERIAL_TEMPLATE, SELECT_TISSUE_LAYER, or, the big one, CASTE) create a sub-sub dictionary for that tag
  • Continue adding to the sub-sub dictionary until you hit a token that exits out of it (e.g. another CASTE or USE_MATERIAL_TEMPLATE etc...)
Viola, now you have a dictionary that you can just compare to another dictionary and if it has extra entries or less entries you can adjust your output accordingly. An advantage to this is you can also specify exactly how you want the output to look, so you could, for instance, output into a broken up structure that is more easy to read like
I think the technical name for that approach is "scope creep."  This sounds like a decent avenue to pursue, but not for a first version.  False-positive rejects are fine since the intended audience is newbs who will probably only load mods pre-loaded with the Starter Pack.  That handful can have their compatibility worked out in manifest files if absolutely necessary.

Once the idea of merge-in mods takes off, more intelligent parsing will be far more valuable.  The important thing for now is to make sure we don't make design decisions that tie our hands down the road.
I have nothing at all against the idea of scope creep, more advanced parsing would be great. 

That said, we don't even have a working basic merge yet, so I think it's a little premature to go quite this complex.  Current priorities:
  1. Get a basic diff-based system working.  We can live with a high rejection rate for now.
  2. Finish the structure of the code, so it can be extended like this later (mostly done).
  3. GUI-ify as tab in a fork of the PyLNP.
  4. Write a function that checks raws for validity and functionality. 

I agree that we should keep thing generally future-proof, but so long as all the options people are proposing take inputs in the same format I don't think its too much of a problem - maybe more work on our end to refactor, but no change for modders or users.  Note that we're not claiming there's a 'correct' or canonical way to merge a given set of raws; given that we're not modifying pre-existing worlds this shouldn't be an issue.  So long as the input is in the format this thread specifies and output is valid to DF, anything goes. 

Just please, let's get a basic model working soon. 
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

King Mir

  • Bay Watcher
    • View Profile
Re: Proposal: a standard format for mods in a diff/patch Mod Starter Pack
« Reply #261 on: August 22, 2014, 11:19:28 pm »

Yeah that sounds like a good list. Here's my comments on it
2) This is really #1. We need the boilerplate to take mod folder structure and generate the merge df raws.
1) This is what I'm working on -- testing my merge algorithm for correctness and expanding as needed.
3) Definitely up there. If there's somebody reading this thread looking to contribute, this would be a good way to help.
4) This will take more then a function. We need sample mods are attempted to be merged that demonstrate the working program. We don't need an exhaustive unit test for the differ algorithm here, but we need enough tests to show the usefulness and limitations of merging.

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: Proposal: a standard format for mods in a diff/patch Mod Starter Pack
« Reply #262 on: August 23, 2014, 12:44:05 am »

3. GUI-ify as tab in a fork of the PyLNP.
3) Definitely up there. If there's somebody reading this thread looking to contribute, this would be a good way to help.
I should do some sketches soon to show what I have in mind.  If anyone wnats to get started let me know and I'll prioritise them. 
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

Merkator

  • Bay Watcher
    • View Profile
Re: Proposal: a standard format for mods in a diff/patch Mod Starter Pack
« Reply #263 on: August 23, 2014, 04:48:32 am »

I am dumb...

Yep, this was easy.
For anyone interested

Code: [Select]
BSTART = '['
BEND = ']'
STR = ASCII+
TYPE = STR
TILE = "'" STR "'"
ARG = SEP STR|TILE
TOKEN = BSTART TYPE ARG* BEND

Logged

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: Proposal: a standard format for mods in a diff/patch Mod Starter Pack
« Reply #264 on: August 23, 2014, 10:27:50 am »

You guys will have to address merge dependencies when addressing conflicts.

The issue happened with me when I merged civforge with 40_09.  Both CHANGED the same areas.  The program has to be smart enough to know a "change" occured, and decide which change to go with.

I would think merely referencing the order of the mods when merging them would be enough to show precedence.  For ex... if I put 40_09 in front of CivForge, I would think 40_09 changes would have precedence over CivForge if both "mods" are affecting the same thing (this is from a base of 34_11 btw).

Update
that kind of swapping of "changed" values vs removed/added values.

May be tricky, some sort of hieuristic comparison between the two candidates to be swapped in has to be done.

Could get very very very tricky with things like merging civforge and accelerated mod.  I've had my kdiff3 thing that two lines were the same because most of the strings were the same and it thought it was the same line.

Anyways, google's diffmatchpatch might come in handy for that. 

https://code.google.com/p/google-diff-match-patch/downloads/list

they may have a python version.  I'd be surprised if they didn't.  But... it might help identify those one liner's.

I figure it could be done w raw structure mapping or... When a line is deleted and replaced, a Google diff match patch is ran on the replacement lines to see if there a match.
« Last Edit: August 23, 2014, 10:05:39 pm by thistleknot »
Logged

King Mir

  • Bay Watcher
    • View Profile
Re: Proposal: a standard format for mods in a diff/patch Mod Starter Pack
« Reply #265 on: August 23, 2014, 02:34:35 pm »

So one of the goals of this is that mods that conflict are marked as conflicting, not silently resolved to favor one. Favoring one may be suitable for some merging applications, like making your own mod bundle, but for someone trying out a batch of mods, having the order the mods are loaded in not matter is a good thing.

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Proposal: a standard format for mods in a diff/patch Mod Starter Pack
« Reply #266 on: August 23, 2014, 09:16:20 pm »

So one of the goals of this is that mods that conflict are marked as conflicting, not silently resolved to favor one. Favoring one may be suitable for some merging applications, like making your own mod bundle, but for someone trying out a batch of mods, having the order the mods are loaded in not matter is a good thing.
I think the merger should raise a warning if there is any overlap, but allow the user to proceed with some simple tiebreaker rules (either a priority list, or a load order with last-in-wins).

The (optional) manifest file can silently OK some of these collisions.

The load order can also be important if we end up with modular mods that require a core be in place before the module is applied.  I have a very specific example in mind, a mod I'm working on that is supposed to be adjusted based on the graphic pack loaded.  Right now my plan is to upload it configured for Phoebus (the Starter Pack's default) and instruct the user thru simple search-replaces for popular graphics.  I'd rather have a core mod tuned for vanilla with modmods for CLA, Ironhand, Mayday, Phoebus and Spacefox.

All of the modmods would only change a single file, one that is added by the core mod.  This sounds like something that should be achievable via a manifest file (and even without one if I publish them as distinct mods).
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: Proposal: a standard format for mods in a diff/patch Mod Starter Pack
« Reply #267 on: August 23, 2014, 09:34:21 pm »

A merge conflict - ie something couldn't be loaded - is marked as a conflict as are all later mods.  This is a red/abort scenario. 

However if a merge over the top of a previous merge is possible, we do it - that's the point of the merge instructions being ordered.  Because this is in general likely to be broken, it's an orange/warning.  However the manifest should eventually have a list on known-compatible parent mods, to help in this exact scenario.  Until we have a working merger this is all pretty academic though!
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

Button

  • Bay Watcher
  • Plants Specialist
    • View Profile
Re: Proposal: a standard format for mods in a diff/patch Mod Starter Pack
« Reply #268 on: August 25, 2014, 05:09:14 am »

So I haven't read all the comments since Friday because it is so late it's early but I just remembered I had yet to upload this so here's the mod loader guys http://dffd.wimbli.com/file.php?id=9509

If you just run it off the bat it'll give errors on the plant files, the raw files need to be flattened out because it gets confused by comments being on the same line as a tag. It's just the load-in not the write-out yet but the write-out should be fairly obvious once you take a look at it.
Logged
I used to work on Modest Mod and Plant Fixes.

Always assume I'm not seriously back

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: Proposal: a standard format for mods in a diff/patch Mod Starter Pack
« Reply #269 on: August 25, 2014, 05:47:56 am »

So I haven't read all the comments since Friday because it is so late it's early but I just remembered I had yet to upload this so here's the mod loader guys http://dffd.wimbli.com/file.php?id=9509

If you just run it off the bat it'll give errors on the plant files, the raw files need to be flattened out because it gets confused by comments being on the same line as a tag. It's just the load-in not the write-out yet but the write-out should be fairly obvious once you take a look at it.

Nice!  Unfortunately it doesn't seem to like the plant_crops, plant_garden, or plant_new_trees files - I got eleven thousand lines of complaining about them! :o  Should be easy enough to fix, I imagine, and I look forward to seeing a full merge based on this (or any other) concept. 
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.
Pages: 1 ... 16 17 [18] 19 20 ... 22