News:

SMFNew Installed

+-+-

User+-

Welcome, Guest.
Please login or register.
 
 
 

Login with your social network

Forgot your password?

Site Stats+-

Members
Total Members: 728
Latest: Cho
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 10932
Total Topics: 795
Most Online Today: 389
Most Online Ever: 854
(September 18, 2024, 07:49:37 am)
Users Online
Members: 0
Guests: 205
Total: 205

Author Topic: SpawnClass, I really mean NO_MAGIC_ITEMS!  (Read 2671 times)

0 Members and 79 Guests are viewing this topic.

SpawnClass, I really mean NO_MAGIC_ITEMS!
« on: »
So I'm creating a monk and since the damage calculations do not work for bare-handed combat, I've created "fist wraps" that can be bought from a merchant that I created. Since this is meant to simulate bare-handed combat, I really need to prevent magic ones from spawning. Here is a snippet from my spawn class for my merchant:
Code: [Select]
[SPAWNCLASS]
<STRING>NAME:MERCHANT_MONK_FIST_WRAPS
[OBJECT]
<STRING>UNIT:FIST_WRAP
<INTEGER>WEIGHT:-1
<INTEGER>RARITY_OVERRIDE:1
<INTEGER>MINCOUNT:2
<INTEGER>MAXCOUNT:2
<BOOL>NO_MAGIC_ITEMS:1
<BOOL>NO_UNIQUE_ITEMS:1
<BOOL>IGNORE_RANGE:1
[/OBJECT]
[OBJECT]
<STRING>UNIT:FIST_WRAP_5
<INTEGER>WEIGHT:-1
<INTEGER>RARITY_OVERRIDE:1
<INTEGER>MINCOUNT:2
<INTEGER>MAXCOUNT:2
<BOOL>NO_MAGIC_ITEMS:1
<BOOL>NO_UNIQUE_ITEMS:1
<BOOL>IGNORE_RANGE:1
[/OBJECT]
...

As you can see, I'm attempting to force 2 of each (the _5 is the level, so I have _10, _15, etc. up to level 100) to be able to buy from the merchant. This is the merchant code:
Code: [Select]
[UNIT]
<STRING>BASEFILE:media/units/monsters/base.dat
<STRING>NAME:MONK_MERCHANT
<STRING>RESOURCEDIRECTORY:media/models/npcs/est_m
<TRANSLATE>DESCRIPTION:Monk Merchant
<STRING>MESHFILE:npc_esm_town_01
<STRING>ALIGNMENT:NEUTRAL
<STRING>UNITTYPE:MERCHANT
<FLOAT>COLLISION_RADIUS:1.5
<FLOAT>MAXHP:250
<FLOAT>MINHP:250
<INTEGER>MINDAMAGE:100
<FLOAT>WALKINGSPEED:0
<FLOAT>RUNNINGSPEED:0
<FLOAT>PLAYER_LEVEL_FOR_MERCHANT:1
<FLOAT>SCALE:1
<INTEGER>RARITY:0
<TRANSLATE>DISPLAYNAME:Arden the Merchant
<STRING>NPCGREET:ScotGreet
<STRING>NPCBYE:ScotBye
<INTEGER>LEVEL:1
<INTEGER>MAXDAMAGE:125
<FLOAT>TURN_RATE:0
<STRING>GOLD_SOUND:GOLDPICKUP
<INTEGER>MERCHANT_LOOT_LEVEL_OFFSET_MIN:-1
<INTEGER>MERCHANT_LOOT_LEVEL_OFFSET_MAX:3
<INTEGER>MINIMUM_MERCHANT_LEVEL:7
<INTEGER>MERCHANTTAB:1
<STRING>UNIT_GUID:5782696698541290877
<STRING>CHEST_OVERRIDE:ESTHERIAN_02_CHEST
<STRING>BOOTS_OVERRIDE:ESTHERIAN_01_BOOTS
<STRING>PANTS_OVERRIDE:ESTHERIAN_02_PANTS
<BOOL>ALWAYSACTIVE:1
<BOOL>DAMAGEABLE:0
<BOOL>INVINCIBLE:1
<BOOL>RENDERBEHIND:0
<BOOL>ALLOWS_MERCH_MAGICAL:0
<BOOL>LOCALONLY:1
<BOOL>DROP_TO_GROUND:0
[INTERACT_UI]
<STRING>UIMENU:MERCHANTMENU
<STRING>UIMENU:PLAYERINVENTORYMENU
[/INTERACT_UI]
[INVENTORY]
<STRING>CONTAINER:Merchant Armors
<STRING>CONTAINER:Merchant Buy Back Bag
<STRING>CONTAINER:Merchant Weapons
<STRING>CONTAINER:MERCHANTBODY
<STRING>CONTAINER:MERCHANTITEM
<STRING>CONTAINER:Pointer
[/INVENTORY]
[TREASURE]
<STRING>SPAWNCLASS:MERCHANT_MONK_FIST_WRAPS
<INTEGER>MIN:1
<INTEGER>MAX:1
[/TREASURE]
[ANIMATION_ALTS]
[/ANIMATION_ALTS]
[EQUIPMENT]
[/EQUIPMENT]
[MESHFILES]
<STRING>MESHFILE:npc_esm_town_01
[/MESHFILES]
[/UNIT]

As you can see, I set the ALLOWS_MERCH_MAGICAL to 0 to also try to prevent magical items. Here is an example of one of the fists:
Code: [Select]
[UNIT]
<STRING>CREATEAS:EQUIPMENT
<STRING>UNITTYPE:MONK FIST
<INTEGER>MAXDAMAGE:100
<STRING>FALL_SOUND:Item Fall
<STRING>TAKE_SOUND:AxeGet
<STRING>LAND_SOUND:AxeDrop
<STRING>STRIKE_SOUND:SwordFlesh
<STRING>ATTACK_SOUND:SwordSwing
<FLOAT>STRIKERANGE:0.7
<FLOAT>RANGE:0.5
<STRING>GAMBLER_ICON:icon_weapon_claw01
<STRING>ICON:icons_armor_wanderer_belt07
<TRANSLATE>DISPLAYNAME:Fist Wrap
<FLOAT>WEAPONARC:0
<FLOAT>SECONDARY_DMG_PCT:0
<STRING>NAME:fist_wrap_10
<FLOAT>DEVIATION_FROM_30FPS:0.8
<TRANSLATE>DESCRIPTION:Protective wrapping for monks to fight without weapons.\n\nRequired to be dual-wielded for bare-handed monk skills. (Wraps are available for every 5 character levels. There is a merchant in the Estherian Enclave that sells the wraps (near the respec merchant))
<INTEGER>RARITY_DMG_MOD:200
<FLOAT>SOAKSCALEPCT:50
<STRING>BASEFILE:media/units/items/fists/base_fist.dat
<INTEGER>SPEED:70
<INTEGER>SPEED_DMG_MOD:60
<INTEGER>LEVEL_REQUIRED:10
<INTEGER>DEFENSE_REQUIRED:200
<INTEGER>MAGIC_REQUIRED:200
<INTEGER>STRENGTH_REQUIRED:200
<INTEGER>DEXTERITY_REQUIRED:200
<INTEGER>SOCKETS:0
<INTEGER>MAX_SOCKETS:0
<STRING>RESOURCEDIRECTORY:media/models/weapons
<STRING>MESHFILE:invisible_weapon
<INTEGER>LEVEL:10
<INTEGER>MINDAMAGE:70
<INTEGER>MINLEVEL:0
<INTEGER>MAXLEVEL:30
<STRING>UNIT_GUID:3018375431840284113
<INTEGER>DAMAGE_PHYSICAL:100
<INTEGER>RARITY:0
[REQ_CLASS]
<STRING>UNITTYPE:MONK
[/REQ_CLASS]
[STATS]
[/STATS]
[/UNIT]

Despite all these things I've tried, the merchant occasionally has green items (as my char levels up there are spawning more frequently). How can I stop it from adding magical properties to these items in the merchant (is this adding item affixes or something)?

The items inherit from "NORMAL FIST" so there should be no magical properties.

Thanks for any help
« Last Edit: December 11, 2015, 03:22:11 pm by Andrew »

Share on Bluesky Share on Facebook


Re: SpawnClass, I really mean NO_MAGIC_ITEMS!
« Reply #1 on: »
As I know this is encoded. I think the easiest way - to make a unique item.
http://forums.runicgames.com/viewtopic.php?f=57&t=59713

like this
tidbi.ru


Code: [Select]
[UNIT]
<STRING>NAME:axe_u05x
<STRING>BASEFILE:media\units\items\axes\axe_u05.dat
<INTEGER>DAMAGE_PHYSICAL:100
<TRANSLATE>DISPLAYNAME:The Axe of Throwing
<INTEGER>LEVEL:40
<INTEGER>RARITY:9
<INTEGER>SPEED_DMG_MOD:100
<INTEGER>SPEED:100
<INTEGER>DEXTERITY_REQUIRED:40
<INTEGER>STRENGTH_REQUIRED:89
<INTEGER>DAMAGE_FIRE:0
<INTEGER>DAMAGE_ICE:0
<INTEGER>DAMAGE_POISON:0
<INTEGER>DAMAGE_ELECTRIC:0
<STRING>UNIT_GUID:-2745156838019801528
<TRANSLATE>DESCRIPTION:Born to fly!
<FLOAT>RANGE:9
<FLOAT>WEAPONARC:0
<FLOAT>SECONDARY_DMG_PCT:0
<STRING>UNITTYPE:MAGIC 1HAXE
<FLOAT>STRIKERANGE:0
<INTEGER>MAGIC_REQUIRED:0
[SKILL]
<STRING>NAME:AXETHROW
<INTEGER>LEVEL:-1
[/SKILL]
[AFFIXES]
<STRING>AFFIX:UNIQUE_DEGRADE_ARMOR3
<STRING>AFFIX:UNIQUE_KNOCKBACK
<STRING>AFFIX:UNIQUE_LUCK2
<STRING>AFFIX:UNIQUE_PROC_AXETHROW100
<STRING>AFFIX:UNIQUE_TL2_SHORTSTUN3
[/AFFIXES]
[/UNIT]

Technically, this is a unique axe, but it looks like rare.
« Last Edit: December 11, 2015, 04:35:09 pm by Kva3imoda »

Re: SpawnClass, I really mean NO_MAGIC_ITEMS!
« Reply #2 on: »


You need to create a unique base item without effects.
For example:
axe_u05
Code: [Select]
[UNIT]
<STRING>BASEFILE:media\units\items\axes\base_axe_unique.dat
<INTEGER>DAMAGE_PHYSICAL:50
<TRANSLATE>DISPLAYNAME:The Cruel Hand of Fate
<STRING>ICON:icon_weapon_axe_varkolyn01
<INTEGER>LEVEL:60
<STRING>MESHFILE:axe_varkolyn01
<STRING>NAME:axe_u05
<INTEGER>RARITY:100
<STRING>RESOURCEDIRECTORY:media/models/weapons/_Axes
<INTEGER>SPEED:100
<INTEGER>SPEED_DMG_MOD:100
<STRING>UNIT_GUID:-3517773071788290131
<INTEGER>STRENGTH_REQUIRED:116
<INTEGER>DEXTERITY_REQUIRED:0
<INTEGER>DAMAGE_ELECTRIC:25
<INTEGER>DAMAGE_ICE:25
<TRANSLATE>DESCRIPTION:It cuts down everyone, eventually.
<INTEGER>MAGIC_REQUIRED:0
[/UNIT]

Then you create a normal item using this base file.
axe_u05x
Code: [Select]
[UNIT]
<STRING>NAME:axe_u05x
<STRING>BASEFILE:media\units\items\axes\axe_u05.dat
<INTEGER>DAMAGE_PHYSICAL:100
<TRANSLATE>DISPLAYNAME:The Axe of Throwing
<INTEGER>LEVEL:40
<INTEGER>RARITY:9
<INTEGER>SPEED_DMG_MOD:100
<INTEGER>SPEED:100
<INTEGER>DEXTERITY_REQUIRED:40
<INTEGER>STRENGTH_REQUIRED:89
<INTEGER>DAMAGE_FIRE:0
<INTEGER>DAMAGE_ICE:0
<INTEGER>DAMAGE_POISON:0
<INTEGER>DAMAGE_ELECTRIC:0
<STRING>UNIT_GUID:-2745156838019801528
<TRANSLATE>DESCRIPTION:Born to fly!
<FLOAT>RANGE:9
<FLOAT>WEAPONARC:0
<FLOAT>SECONDARY_DMG_PCT:0
<STRING>UNITTYPE:NORMAL 1HAXE
<FLOAT>STRIKERANGE:0
<INTEGER>MAGIC_REQUIRED:0
[SKILL]
<STRING>NAME:AXETHROW
<INTEGER>LEVEL:-1
[/SKILL]
[/UNIT]

Re: SpawnClass, I really mean NO_MAGIC_ITEMS!
« Reply #3 on: »
Hmm ... Well, I tried to do it.
It seems that sometimes it's not working - I have a green items. Also, I tried to add the BLANK_NO_EFFECTS affix - this is also does not work.  >:(

Re: SpawnClass, I really mean NO_MAGIC_ITEMS!
« Reply #4 on: »
Hmm ... Well, I tried to do it.
It seems that sometimes it's not working - I have a green items. Also, I tried to add the BLANK_NO_EFFECTS affix - this is also does not work.  >:(

Yeah I tried that too. I also added 6 dummy affixes (rank 1, 6, 11, 16, 21 and 26) and the level 100 item in my test ended up green. Not sure if that was because of the rank or it just didn't work. Not sure what else to try at the moment.

Re: SpawnClass, I really mean NO_MAGIC_ITEMS!
« Reply #5 on: »
Hey Andrew! Sorry I don't really have an answer for your current problem - I just wanted to welcome you to Torchmodders ;) thanks for coming here for help, we're honored.


Re: SpawnClass, I really mean NO_MAGIC_ITEMS!
« Reply #6 on: »
FYI, I found a way around my barehanded damage issue so I can avoid having to create fake items. Basically I can add a flat damage affix for each char level and use stat modifiers on strength, damage %, etc to boost the damage as the normal damage would be boosted by such thing. As a result I don't need to address the issue found in this thread.

Re: SpawnClass, I really mean NO_MAGIC_ITEMS!
« Reply #7 on: »
...I can add a flat damage affix for each char level and use stat modifiers on strength, damage %, etc to boost the damage as the normal damage would be boosted by such thing.

That's a neat solution Andrew, thanks! and good news for anyone making a barehanded fighter class ;)

Is that done just within the player unit's .DAT file (or the unit>player editor screen in GUTS)?


Re: SpawnClass, I really mean NO_MAGIC_ITEMS!
« Reply #8 on: »
...I can add a flat damage affix for each char level and use stat modifiers on strength, damage %, etc to boost the damage as the normal damage would be boosted by such thing.

That's a neat solution Andrew, thanks! and good news for anyone making a barehanded fighter class ;)

Is that done just within the player unit's .DAT file (or the unit>player editor screen in GUTS)?

It was very complex and it may be best to have people just see my source once I publish the mod (I'm still balancing my monk class and testing it with Synergies as that is what it is intended to be used with). The gist is this:
  • Add a stat for the class type INT that will record the last level processed
  • Add the stat with value 1 in the player
  • Add a triggerable in the player to fire on kill
  • Add a passive hidden skill in the player with 100 levels starting with level 1. For each level of the skill add a passive AFFIX (yes that means 100 affixes) that apply a damage bonus (fixed number per level, simulating the weapon damage) and use strength, dual wield and physical damage % as stat modifiers (as a bonus)
  • In the triggerable, fire off a skill on kill (I simply cannot get LEVELUP to fire, that is another thread I just started) and base it on character level
  • In the skill fired by the triggerable, put a stat watcher on the EXPERIENCE LEVEL not equal to the stat (so it only fires once per level change)
  • In the skill fired by the triggerable, call an instant AFFIX to set the stat to the users current level (ensuring the skill cast by the trigger is only cast once per level change)
  • In the skill fired by the triggerable, use the SET SKILL LEVEL effect in an AFFIX to set the passive skill to the player's current level. Note that I found that SET SKILL LEVEL did not work with a stat modifier, so I had to create 100 AFFIXES to set the skill level
  • Create a FIST WRAP item that basically is a claw with no damage (with its own unit type)
  • In the passive skill, enforce that the user dual wields the FIST WRAP unit type to get the extra damage

It took me a while and several attempts, but it is working. I had to use MIN/MAX to be one number, not a range as it seems TL2 just picks a number in that range instead of actually using it on each hit, so the barehanded damage is like an AXE, doing one set damage amount. I used python code with unicode support to create the 200 AFFIXES and the two skills that have 100 levels so that I would not go nuts. It also makes it easy to change the amount of damage as I make one code change and then regenerate all 100 or 200 AFFIXES for example.

Re: SpawnClass, I really mean NO_MAGIC_ITEMS!
« Reply #9 on: »
 ???
"complex" is not an exaggeration then! I salute you for figuring all that out AND for your sheer determination!


Re: SpawnClass, I really mean NO_MAGIC_ITEMS!
« Reply #10 on: »
I know I'm  late to the party, but it makes sense that NO_MAGIC tag won't work, because for GUTS "magic" means blue items, and NO_MAGIC prevents blue items from spawning as intended.

 

Recent Topics+-