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: 212
Total: 212

Author Topic: Missile Aim gone Wrong  (Read 2189 times)

0 Members and 82 Guests are viewing this topic.

Missile Aim gone Wrong
« on: »
Hey everyone!
Wonderful to be here and be a part of this great community.
I am diligently attempting a New Class and I am having a problem (besides brain melt)

I cannot get my Missile skill to aim properly.

I would like to add that I have created other missile type skills without having aiming issues that for some weird reason this issue just created it self.

Every time I Build the mod and test it in game it only shoots to about the 10:00 position.

I wanted to try and make a bow skill that would leave a small Aoe and target the mouse cursor so you can set up a little "Damage shield" so took me about 30+ hours to learn Guts a little and get into editing the Text files, Layouts, particles etc.

I feel like I have a pretty basic understanding not only of what can be done but also the depth of how bad things can go wrong.

After many many long nights and starting over I finally have everything the way I want it... except the dang missile just wings off at about 30 degrees to the top left... every time.

It works basically perfectly in the Work space (occasionally it shoots behind me when I am aiming to close to myself) but is totally broken when I build the mod. 

this is my post in the runic mod forums here http://forums.runicgames.com/viewtopic.php?f=47&t=68190
« Last Edit: March 15, 2016, 07:51:32 pm by Zanadube »
“Change is not always growth, but growth is often rooted in change."

Share on Bluesky Share on Facebook


Re: Missile Aim gone Wrong
« Reply #1 on: »
heyo, welcome to torchmodders

just from reading, the problems you have could have come from copying a skill and not changing the GUID, or there could be just some weird setting in the missile file and unit spawner

if you dont mind, post your mod file so i can have a look and see whats wrong.
« Last Edit: March 15, 2016, 08:43:24 pm by TwinkleToes »

Re: Missile Aim gone Wrong
« Reply #2 on: »
Thanks Twinkletoes!

OK the mod file is linked below....

I have fiddled the target angles and some other stuff from 0-180 in the text layouts on a few files trying to root out the issue to no avail. Not sure exactly what those should be setting them to 0 seemed to work fine as well as 180... soooo.  :'(

One more question:

I really want the arrow to arc to the target... but if I aim to close it just dies in the middle of its arc and then drops the aoe.

Non-Steam Download
« Last Edit: March 15, 2016, 10:47:29 pm by Zanadube »
“Change is not always growth, but growth is often rooted in change."

Re: Missile Aim gone Wrong
« Reply #3 on: »
ok fixed it and made it arc properly
it was simple to fix the targeting, but arcing missiles are pretty technical, and i had to edit more than just the skill file
anyway, ill try and break it down so you can somewhat understand whats going on lol. 1st the skill code and the changes i made.

Code: [Select]
[SKILL]
<STRING>NAME:RangerFireArrow
<TRANSLATE>DISPLAYNAME:Fire Arrow
<TRANSLATE>DESCRIPTION:The Ranger Lights an Arrow and Launches it at Their Enemies.
<TRANSLATE>BASE_DESCRIPTION:Fire Arrow
<TRANSLATE>REQUIREMENT_DESCRIPTION:Requires a Bow or Crossbow to use.
<STRING>SKILL_ICON:skillicon_longrange
<STRING>SKILL_ICON_INACTIVE:skillicon_longrange_gray
<STRING>ACTIVATION_TYPE:NORMAL
<STRING>TARGET_ALIGNMENT:EVIL
<STRING>TARGET_TYPE:POSITION
<BOOL>USEWEAPONANIMATION:1
<FLOAT>RANDOMRANGE:0
<FLOAT>RANGE:15
<FLOAT>TARGETRANGE:3
<FLOAT>RANGEMIN:3
<FLOAT>MANACOST:4
<INTEGER>COOLDOWNMS:1000
<FLOAT>FINDTARGETANGLE:360
<FLOAT>TURNRATEOVERRIDE:-1
<BOOL>CAN_BE_SILENCED:0
<INTEGER>LEVEL_REQUIRED:0
<INTEGER64>UNIQUE_GUID:3240634451233832361
[REQUIREMENT_LEFT]
<STRING>UNITTYPE:BOW
<STRING>UNITTYPE:CROSSBOW
[/REQUIREMENT_LEFT]
[LEVEL1]
<FLOAT>RANDOMRANGE:0
[EVENT_TRIGGER]
<STRING>FILE:media/skills/ranger/fireearrowranger.layout
<FLOAT>CHARGESCALEPCT:10
<BOOL>CAN_CLONE:0
<BOOL>BUILD_CHARGE:1
[/EVENT_TRIGGER]
[EVENT_MISSILEDIE]
[EXECUTE_SKILL]
<STRING>SKILL:FIREAOERANGER
[/EXECUTE_SKILL]
[AFFIXES]
<INTEGER>AFFIXLEVEL:1
<FLOAT>DURATION:4
<STRING>AFFIX:ARBITER_MAGMA_SPEAR_IGNITE
[/AFFIXES]
[/EVENT_MISSILEDIE]
[/LEVEL1]
[/SKILL]

what i removed
   <FLOAT>SLOWDOWNMS:2000
   <BOOL>DONT_STOP_ON_DEATH:true
   <STRING>TRIGGER:HIT
   <BOOL>CAN_PROC_FROM_SKILL:0

these are just superfluous for the skill, they have other applications elsewhere but in this case they do nothing.

         <FLOAT>TARGET_AHEAD_OF_UNIT:2
         <FLOAT>LINE_EMITTER_OFFSET:0
         <STRING>FIREFROMBONE:RIGHTHAND
         <STRING>FIREATBONE:CENTER

more lines at the event strings i took out
fire from/at bones lines had to be taken out since they are the main culprits of the wonky targeting, they force the missile to always fire from the characters right hand bone and fire at the center of a targeted unit, if there is nothing targeted(aiming on ground) the missile will careen into a random direction

what i changed
    <FLOAT>FINDTARGETANGLE:360
for monsters its set differently so they aim at certain angles towards the player. this is also used in skills which require targets to give it an angle to where it will snap and acquire the target regardless of where the mouse is located, the radius is controlled by the max and min range

   <FLOAT>RANGEMIN:3
changed from 6 so the missile can arc at close range and still hit whatever is in front, if its set too high you wont be able to hit anything close

what i added
   <FLOAT>TARGETRANGE:3
this sets the minimum distance you can select targets, its different from range min since this range applies when you physically click on a target

now for the missile file, this is key to making the missile arc propperly
you only need to set some things to false in the side menu to get it working


TARGET POSITION: FALSE
this makes the missile free from targeting constrains and lets the skill handle the targeting, this is typically used for straight trajectories to control where the missile will end. this is a minor part of what made the targeting wonky, since the missile is asked to end at the target area, but is also given a set distance to travel, so it ends up exploding in mid air

COLIDES WITH OBJECTS: FALSE
this is to make the missile arc at close range properly, if this was set to true the missile will instantly collide with any unit in front and not perform its arc, this is typically set to true for straight trajectories and missiles which dont have a following missile die event

ARCH DISTANCE: 0
this will force the missile to always go a set distance when it arcs, if set to 0 the missile can arc freely though out its max range and enables it to be aimed at targets properly

now for the unit spawner settings within the layout file,
the only thing that had to be done was shift the Y axis of the spawner up to 1.5
since the missile no longer spawns from the right hand bone, we just have to set it to spawn a bit higher up so it aligns with the character and doesn't instantly collide with the ground.


thats it
this is what it looks like after the changes.
i want you to try and do this yourself so you get a better feel for GUTS and learn from it
gl and have fun modding.



« Last Edit: March 19, 2016, 10:04:00 pm by Phanjam »

Re: Missile Aim gone Wrong
« Reply #4 on: »
As always @TwinkleToes  your expertise is astounding!

@Zanadube since you created the skill I gotta say that's a really great concept ;) oh and welcome to Torchmodders!


Re: Missile Aim gone Wrong
« Reply #5 on: »
Omg!  :o

Guys im tingling all over!  ::)

Thank you immensely this is going to help massively! :-*
“Change is not always growth, but growth is often rooted in change."

 

Recent Topics+-