Scripting Questions RK and Resin discussion

Everything about mods can be found here.

Moderator: Morax

Scripting Questions RK and Resin discussion

Postby Sheeo » 17 May 2014, 17:34

RK4000 wrote:
Resin_Smoker wrote:RK, did you ever clean up your script work and properly hook stuff ?


Most things in the mod are non-destructively hooked, except when it needs to override stuff.

We ran into an issue with a large file where derived classes are defined immediately after the base class. This makes it difficult to hook the base class and have those descendants actually use the new functions, since you can't inject code in the middle of a file (to my knowledge).

A little more digging into the moho class implementation might turn up a way to do it without too much babble.
Support FAF on patreon: https://www.patreon.com/faf?ty=h

Peek at our continued development on github: https://github.com/FAForever
Sheeo
Councillor - Administrative
 
Posts: 1038
Joined: 17 Dec 2013, 18:57
Has liked: 109 times
Been liked: 233 times
FAF User Name: Sheeo

Re: New explosion FX's

Postby Resin_Smoker » 17 May 2014, 20:01

Sheeo wrote:
RK4000 wrote:
Resin_Smoker wrote:RK, did you ever clean up your script work and properly hook stuff ?


Most things in the mod are non-destructively hooked, except when it needs to override stuff.

We ran into an issue with a large file where derived classes are defined immediately after the base class. This makes it difficult to hook the base class and have those descendants actually use the new functions, since you can't inject code in the middle of a file (to my knowledge).

A little more digging into the moho class implementation might turn up a way to do it without too much babble.


One thing i noticed in the files was the fact that large number of texture were copied. These textures aren't new nor modified but this done because as it was just easier than pathing to the textures held within gamedata. IMO this is sloppy and makes the mod size much bigger than it needs to be.

BTW: I'm not blasting you, just trying to point out an issue in the hope that it will be resolved at some point.

Resin
Resin_Smoker
Evaluator
 
Posts: 858
Joined: 14 Mar 2012, 17:58
Has liked: 54 times
Been liked: 106 times

Re: New explosion FXs (rks_explosions)

Postby RK4000 » 17 May 2014, 20:10

One thing i noticed in the files was the fact that large number of texture were copied. These textures aren't new nor modified but this done because as it was just easier than pathing to the textures held within gamedata. IMO this is sloppy and makes the mod size much bigger than it needs to be.


Well, while I do still need to fix this it's quite low on the list.

Right now the total amount of unnecessary size (it's only unmodified ramps, which are 2x20 pixel textures, REALLY tiny, put there for the ease of pathing) is 1.2 MB, which is not a lot at all.

This has no impact either the look of the mod or the performance whatsoever, which is another reason why I haven't fixed this tiny issue yet, because it would require quite a lot of work (figuring out which effecs use custom ramps and which don't, then making pathing adjustments in each, which could mean over 100 effect files, done one by one) for practically no benefit whatsoever, so it's really a tiny issue that doesn't really matter at all.

And the reason why the paths are like they are is not because I made them like this on purpose because I'm sloppy, but because these explosions used to be part of my featured mod, which uses normal gamedata paths (not like a mod), so when I extracted the files and made it a standalone mod, I didn't adjust the paths, rather just copied the 1.2 MB worth of files. Was more a convenience thing than anything to save some development time :?

It's good that you care for these tiny things, and I am aware of this slight pathing issue with a few files, but at the moment tiny trivial details like this, which were done for convenience reasons and development time saving reasons and that don't affect the mod in any way shape or form as far as visuals or performance are concerned, are not really important :D
User avatar
RK4000
Priest
 
Posts: 366
Joined: 18 Dec 2012, 23:06
Location: Slovenia
Has liked: 22 times
Been liked: 81 times
FAF User Name: RK4000

Re: New explosion FXs (rks_explosions)

Postby Resin_Smoker » 17 May 2014, 20:20

Well i suggest that you consider it a priority at some point especially if you'd like to see inclusion as a featured mod. Besided this does have an impact on the game itself as the extra files cause the game to load slower.

BTW Did you know that the original 4th dimension mod had an explosion enhancement extension?

Here is a link to a video of it: https://www.youtube.com/watch?v=wkvCr_bTskA
Resin_Smoker
Evaluator
 
Posts: 858
Joined: 14 Mar 2012, 17:58
Has liked: 54 times
Been liked: 106 times

Re: New explosion FXs (rks_explosions)

Postby RK4000 » 17 May 2014, 20:32

Resin_Smoker wrote:Well i suggest that you consider it a priority at some point especially if you'd like to see inclusion as a featured mod. Besided this does have an impact on the game itself as the extra files cause the game to load slower.

BTW Did you know that the original 4th dimension mod had an explosion enhancement extension?

Here is a link to a video of it: https://www.youtube.com/watch?v=wkvCr_bTskA


See, here's the thing:

#1: I'm in no way interested in having this as a featured mod. It will either stay a mod vault mod, or, if people like it a lot (which they seem to), it might become part of normal FAF. (Again not originally my own intentions, people are asking this on their own ^^) And even if it was a featured mod, the paths right now would actually work. That's why I don't think you understand why things are as they are.

#2: I'd appreciate not promoting a completely different mod, whose explosions are not even compatible with normal unmodded FA. (they require the normal 4DC mod to work)

#3: This is, as stated before, a different matter alltogether, and does not belong on this thread which is meant for feedback for the visual aspect of the mod, for performance feedback, and update notifications.

#4: I'm pretty sure loading 1.2 MB of ramp textures doesn't take too long ^^, if you consider how fast it loads the 1 GB or so of other textures. Besides, some textures are not even loaded when the game initializes, rather they are loaded as the game goes on and then cached. So if it loads these ramps as it goes, it's not different at all than if it would load a ramp from the normal gamedata directory.

#5: If I wanted to, I could easily make my explosions as over the top and flashy as those, but I'm not going to to for the simple facts that I want mine to look better than the current ones, while not being over the top, so it fits more people's tastes, and performance issues. I'm farily certain the explosions in that video emit far more particles than any of mine ;)
User avatar
RK4000
Priest
 
Posts: 366
Joined: 18 Dec 2012, 23:06
Location: Slovenia
Has liked: 22 times
Been liked: 81 times
FAF User Name: RK4000

Re: New explosion FXs (rks_explosions)

Postby Resin_Smoker » 18 May 2014, 22:00

RK, i suggested looking at the 4th-D files as just a means of seeing scripting solutions that could help you. Wasn't trying to offend or promote another mod.
Resin_Smoker
Evaluator
 
Posts: 858
Joined: 14 Mar 2012, 17:58
Has liked: 54 times
Been liked: 106 times

Re: New explosion FXs (rks_explosions)

Postby RK4000 » 18 May 2014, 22:11

Resin_Smoker wrote:RK, i suggested looking at the 4th-D files as just a means of seeing scripting solutions that could help you. Wasn't trying to offend or promote another mod.


Well OK in that case I appreciate your intentions :)

For now I have all the things scripted as I would like them and it works really well. The only thing to do now is polish up the effects, and after that we'll see if there is any more scripting that needs to be done, but right now, I have all the things I know I need and will need in the future scripted already :)

Thanks anyway though ^^
User avatar
RK4000
Priest
 
Posts: 366
Joined: 18 Dec 2012, 23:06
Location: Slovenia
Has liked: 22 times
Been liked: 81 times
FAF User Name: RK4000


Return to Mods & Tools

Who is online

Users browsing this forum: No registered users and 1 guest