Glow effects (in mobs)

06/18/2013 22:10 sominus#1
This is about this topic: (post #10 from Castor)

[Only registered and activated users can see links. Click Here To Register...]

I write here 'cause that post is old and we can't post there.

I've inserted 2 effects in a mob in this sequence:
02000000 <- was 00000000 before
01000000 <-enabled
??000000 <-fx1 id
01000000 <-enabled
??000000 <-fx2 id

?? = number of effect from Castor's monster.eft dump

And it works fine in game. Tried mixing random effects and it looks at least 'interesting' to see.

My question is: are these effects made using textured 2D polygons?
Could it be that these polygons made the mob be stuck on the floor (he stands in a place but wont move any where else)

It happened to me in one of several tests, the mob would only fight me when I'm next to him, if I run he won't chase me or try to attack me.
----------------------------------------------------------------------------------


Update:
I thought this might help someone who's just starting in editing a client,
so I've made some screenshots. Before reading this, be sure to read Castor's posts, for a better understanding.

Note: My OS are in spanish, I'll try to explain the options in english

First, we open Monster.mon in SStudio and choose a model
(In this case I'm gonna use my Model#727: a_TesterGuy_1
You can see it says 0 in the # Feat. column:
[Only registered and activated users can see links. Click Here To Register...]
----------------------------------------------------------------------------------


Now we open Monster.mon again, but this time with HxD, and search for our model name
(In my case it was a_TesterGuy_1 so we press CTRL + F and search for it)
Remember to search on the right side of the window.

When you find it, scroll down to the next model name, and look before it. You will see the last
texture name from our model, in my case it was fnx_test2_a2.dds

Highlight that filename in the right panel, and you'll see on the left, the corresponding bytes also highlighted.

Now, the next 4 bytes, are the model Height, and the next 4 bytes (they'll be zeros in most cases), are the amount of effects that model use (in this case, zero=none):
[Only registered and activated users can see links. Click Here To Register...]


----------------------------------------------------------------------------------
Now, we're going to add 1 effect. For this we have to insert 8 more bytes
(4 to indicate that FX is enabled, and 4 more to indicate the Effect #ID)

So put the cursor after the last zero in 00 00 00 00
Now go to main menu, Edit -> Insert Bytes
And a window will pop up.
Fill it like this:
-Ammount: 8
-Fill pattern: 00
-Be sure "Hex" is checked.
-And press OK
[Only registered and activated users can see links. Click Here To Register...]


----------------------------------------------------------------------------------
Now, you should have 8 more bytes with 00 value each.
Your data should look something like this:
(the 01 in red, will be a 00 in black in your case, is ok)
The highlighted part, are the 8 bytes we've just added.
[Only registered and activated users can see links. Click Here To Register...]


----------------------------------------------------------------------------------
Now, remember the first 4 bytes right after the height bytes, are the amount of FX our model will use, so set the first byte to 01
It should say 01 00 00 00 - 00 00 00 00 - 00 00 00 00 now (without the "-").

Now, the second 4 bytes (enabled/disabled flag), set it to 01 also.
It should say 01 00 00 00 - 01 00 00 00 - 00 00 00 00 now.

Now the final one, the ID of the effect (taken from Castor's dump list).
On the 4 final bytes, put the ID number of the effect you choose.
In my case I've choose effect #168 (red aura around mob), wich in hex will be A8. You can use windows calc to translate decimal to Hex.

Write that number on the first of the final 4 bytes.
You should end up having:01 00 00 00 - 01 00 00 00 - A8 00 00 00
It will look like this:
[Only registered and activated users can see links. Click Here To Register...]


----------------------------------------------------------------------------------
Now save the file (Monster.mon), close it, and open it again in Shaiya Studio.
Go to the model you just edited.
It should say "1" now, in the # Feat. column:
[Only registered and activated users can see links. Click Here To Register...]

Now put that file in your client (using Data File Tool or making a .patch)

Update your client, go in-game and create a mob that use the model you edited.

It should show the effect now:

[Only registered and activated users can see links. Click Here To Register...]
(in my case I've used a black smoke-like effect, and it's a little dark, that's
why it doesn't show too much in the picture, but it looks better when you are
in-game)

----------------------------------------------------------------------------------
Well that's all, sorry again for my english.
And all credits for this post goes to Castor who shared the info on "how it works" and how we could insert the effects .

Question:
I have a doubt. If I want to use effect #267, which in Hex is 10B, how do I write that in those 4 bytes?
10 B0 00 00 ?
B0 10 00 00?
Or how :confused:?
06/19/2013 23:07 castor4878#2
as nubness indicated: the "other thread" belongs to all of us, unfortunately (?!) it means it is also open to those who edit their profile just to tell us that they "FUCK [US]" or to those who will claim to know, well all kids from 6 to 14 yrs old repeat endlessly "I know I know", but this is not a point and this forum prefers technical facts (in case they are 'social networks' elsewhere specially created for such statements). endpoint.

so, effects are not all generated by textured polygons. smog, "portal-eye" and others seem to use different procedures (possibly including DirectX proprietary API to generate such effects).

But the use, of the leak, of effect is not supposed to change the mob attacks. And this should be true whatever the method used to draw the effect, even if we imagine a bugged effect that breaks the flow process, it will be hard to believe that the bug changes the attacks of the mobs based on the distance to a character. Attacks would be always, or never active, but since the presence of a char. does not change the draw of the effect (it indeed exists regardless of any character), it has no reason to alter the attacks.

does the mob stops to chase you only because of a change on the effect? meaning have you tested the mob before to be sure its behaves as expected, and do you perform only that change?
also do not hesitate to give all information (incl. mobs definition) to let everyone test the same thing that you.
06/19/2013 23:43 sominus#3
Yes, it was working before.

With "block" I mean: could it be effect is bad applied (wrong size for that mob)?
And that way, the effect's polygons made some kind of collision with the floor mesh (as when a character gets stuck on some maps due to some invisible polygons there)

Anyway, I asume now that the effect itselft is not actually attached to the mob model, so it would not make it colide with something, right?

I'm gonna make the mob again from scratch to see what happens.

I've put him a very short delay on his attacks, which are ussualy 2500/2500 on all mobs.
But I've changed it to 600/900 on this one, to make it hit faster, and it used to work (he was like using a max flash lapis, lol) but may be now is causing some bug on the mob).

Mob spects:

Code:
MobID,MobName,Level,Exp,AI,Money1,Money2,QuestItemID,HP,SP,MP,Dex,Wis,Luc,Day,Size,Attrib,Defense,Magic,ResistState1,ResistState2,ResistState3,ResistState4,ResistState5,ResistState6,ResistState7,ResistState8,ResistState9,ResistState10,ResistState11,ResistState12,ResistState13,ResistState14,ResistState15,ResistSkill1,ResistSkill2,ResistSkill3,ResistSkill4,ResistSkill5,ResistSkill6,NormalTime,NormalStep,ChaseTime,ChaseStep,ChaseRange,AttackType1,AttackTime1,Attackrange1,Attack1,Attackplus1,Attackattrib1,Attackspecial1,Attackok1,Attacktype2,Attacktime2,Attackrange2,Attack2,Attackplus2,Attackattrib2,Attackspecial2,Attackok2,Attacktype3,Attacktime3,Attackrange3,Attack3,Attackplus3,Attackattrib3,Attackspecial3,Attackok3

3252,'Testing1',33,0,198,0,0,0,500000,8000,8000,2000,2000,2000,1,1,0,1000,1500,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,2000,13,1000,16,18,0,600,2,1500,702,0,0,1,0,900,2,1500,702,0,0,1,413,10,18,3000,500,0,0,3)
As you can see, AttackTime1 and AttackTime2 are 600 and 900 (they're usually 2500 on all mobs).
This mob if for testing so his stats are not "normal".

I've just added effects to another mob and it works normal, so I gues my problem is just bad definition and no related to the effect.
06/27/2013 16:51 sominus#4
I've fixed it, the problem was in definition somewhere (but couldn't find what was it), just made the mob again.

Now the problem I get is Shaiya Studio crashing when tryin to edit Monster.mon (when trying to add something in the Mon Editor window), when I try to Save the file, SS crashes on me.
06/27/2013 23:39 [ADM]SpyRow#5
by doing this and have around 500 mobs in 1 map like DD1 wont cause lag?
07/02/2013 21:17 sominus#6
Yes it's a lag-raiser. But Im thinking on using it on certain bosses only.

PS: About my earlier problem, I've found that SStudio crashes on me when adding the Effects only:
Attack1 Attack2 Attack3 Die (the .eft filenames)

The sequence is:
-Open monster.mon
-Go to a model definition (in this case custom model #730)
-Double click on its name to open de properties window
-Add 3DC and DDS
-Add .ANI files
-Add .wav files
(so far everything works and I can save the file)

-Add .EFT files
Now, when y click OK it doesn't keep the data I put there. If I open the model again, the content of the Effect textboxes is gone and if I try to save, it crashes.
07/04/2013 21:46 castor4878#7
Thanks for this sequence, and more globally for your useful feedback.
I do reproduce the bug, it was still present in current working project.

there is no reliable way to bypass the bug.

if some of the 17 filenames are empty when the edit dialog is opened, the dialog will lose some of the last fields and the appli can crash when the file is saved (the crash does not suppress the old valid file that can still be reloaded).
the bug impact newly created model record as well as any existing records if some of their filenames are empty when they are edited.
regarding new records (new model description), the creation in one step with all required filenames generates a valid record and the monster.mon file can be saved w/o issue (including if it contains empty filenames).
the issue, with most of the time crash, occurs when the record is edited, not when created.

the record editor of the monster.mon file shall so be used:
- to display the content of a record (the names of anim., effect & wav files)
- to fully create a new record
but not to edit an existing record.
07/07/2013 13:35 Lola.#8
Coooooool :D
07/07/2013 21:40 sominus#9
Yes, I've noticed that creating a new Record, and filling up all the required data at once, will make a valid record and not crash. I'm using it that way now, and no more crashes.
Thanks for your reply.