Jump to content


* Creature Conversion


1 reply to this topic

#1 FredSRichardson

  • Modders
  • 312 posts
  • Gender:Male

Posted 07 August 2007 - 09:53 AM

Okay, I think I've got a creature conversion strategy figured out. It's a bit piece-meal and will need to be extended. I thought I'd start documenting it here. So far it works great of cases where I have some version of a monster already in IWD2 that needs to be tweaked to match the one from IWD1.

There are a lot of ways I can think of for improving this syntax, but I'm just not that excited about hacking a more complex parser at the moment (and I think it'd be better not to do anything until it's necessary):

 ~IWD1.CRE~	< ~IWD2.CRE~ 
			   // Set scripting "death" variables
			   SET_VAR2 (~VAR2~);
			   SET_VAR3 (~VAR3~);
			   // Set animation
			   SET_ANIMATION(anim_index);
			   // Set enemy/ally.  Useful if you're starting with a summon:
			   //	   use 255 for enemy
			   SET_ENEMY_ALLY(ea);
			   // Set colors.  Someone told me these just change console text color in IWD2:
			   SET_COLOR(metal, minor, major, skin, leather, armor, hair)
			   // Remove all items (causal):
			   REMOVE_ALL_ITEMS (); 
			   // Add and equip IWD2 item.  Slot is one of:
			   //	 HELMET
			   //	 ARMOR
			   //	 GAUNTLETS
			   //	 L_RING
			   //	 R_RING
			   //	 AMULET
			   //	 BELT
			   //	 BOOTS
			   //	 WEAPON1
			   //	 SHIELD1
			   //	 WEAPON2
			   //	 SHIELD2
			   //	 WEAPON3
			   //	 SHIELD3
			   //	 WEAPON4
			   //	 SHIELD4
			   //	 CLOAK
			   //	 QUIVER1
			   //	 QUIVER2
			   //	 QUIVER3
			   //	 QUICK_ITEM1
			   //	 QUICK_ITEM2
			   //	 QUICK_ITEM3
			   //	 INVENTORY
			   ADD_AND_EQUIP_TARGET (~IWD2.ITM~, ~SLOT~, qc1, qc2, qc3, flags); 
			   // Add and equip (converted) IWD1 item:
			   ADD_AND_EQUIP_SOURCE (~SKEL_M1.ITM~, ~WEAPON2~, 0, 0, 0, 0);
			   // Set XP, I'm not sure this has any meaning in IWD2
			   SET_XP(15, 1); 
			   // Set HP
			   SET_HP(curr, max); 
			   // Set challenge rating
			   SET_CR(cr); 
			   // Set armor class:
			   SET_AC(ac, bludgeoning_mod, missile_mod, piercing_mod, slashing_mod); 
			   // Set attributes
			   SET_ATTR(str, int, wis, dex, con, chr); 
			   // Set base-attack-bonus and # of attacks
			   SET_BAB(bab, num_attacks); 
			   // Set saving throws:
			   SET_SAVES(fort_save, reflex_save, will_save); 
			   // Set luck, this is typically 0, negative when the party is going to need
			   // help (early on), or positive for a really though boss
			   SET_LUCK(luck); 
			   // Set class levels
			   SET_LEVELS(barb, bard, cleric, druid, fighter, monk, paladin, ranger, rogue, sorc, wiz)
			   // Set resistances
			   SET_RES(fire, cold, elec, acid, spell, magic_fire, magic_cold, 
					   slashing, bludgeoning, piercing, missile, magic_damage);
			   // Boolean feats.  This needs work, right now you have to caclulate your
			   // own bit-field logical or-ing
			   SET_FEATS_FLAGS(flags1, flags2, flags3);
			   // Incremental feats.  This is also a pain because of the number of params:
			   SET_FEATS(bow, xbow, missile, axe, mace, flail, polearm, hammer, quarter_staff,
						 large_sword, blade, toughness, armored_arcana, cleave, armor, 
						 spell_focus_enchantment, spell_focus_evocation, spell_focus_necromancy,
						 spell_focus_transmutation, spell_penetration, extra_rage, extra_shape_shift,
						 extra_smite, extra_turning, bastard_sword);
			// Make sure last item doesn't end in ";" (I know this is bogus)
		  >
~IWD1.variable_of_cre~	 [ ~Ghast~ ]


#2 FredSRichardson

  • Modders
  • 312 posts
  • Gender:Male

Posted 13 November 2008 - 09:27 AM

I'm thinking this should really be template based, that is you could specify a template like "townperson" "level3ftr" or something which would set basics (levels, feats, classes, attributes) and then you could overload specific values. The other thing would be to leave something subject to automatic conversion from the original IWD1 resource (scripts etc). I'll have to look into this some more.




Reply to this topic



  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users