Jump to content

Recommended Posts

  • Developer

I won't create a thread just for this.I like the new option in the download section of setting a file as being the thumbnail. But when it's set only as such, it's added to the downloadable stuff. Isn't better to have it only as thumbnail without having to add it to the screenshots to not pop with the downloads ? Or is that deliberate ?

I'll have to ask [MENTION=1]JoeW[/MENTION] if this is deliberate, but I suspect it's just based on how the download extension for the forum works.
  • Developer

I made a new nightsword but there is strange white line besides the sword when it is placed on the floor.

Can you post a screenshot?The two most likely things are that either you need to use Premultiply when making the .tex, or that you painted too close to the edge of the texture.

I believe those pixels are just white. You need to reedit the tex and make sure you erase them.

In fact I edited them with only red color, and I checked the .png images but found nothing wrong. Something happened during I make them .tex images or in the anim file.

I will post the mod in one or two days and I wil be glad if you can take a look at it then.

Ruby, please do the conversion again and make sure that pre-multiply alpha is turned on in TexConverter.

What happens is: A pure white pixel that is completely transparent will show up in game as a pure white pixel if you didn't pre-multiply alpha. If you moved the texture and your paint program filled the empty space with white, and you erased it, (or if your paint program filled it with 0% opacity white) it will still show as white when it's converted.

When you pre-multiply alpha, a 0% opacity white turns to 0% opacity black. This is why the rest of your image is transparent. It wasn't disturbed. But where you shifted it around, or modified it, the transparency is wrong.

Very nice! Thanks for the effort, much needed! You could just post this as a mod, that way everyone could find and download it.

There needs to be a general discussion thread, made a new tool for you guys so you don't have to hex-edit those build.bin files anymore.

Posted Image

Download here.

[MENTION=55]Ipsquiggle[/MENTION], have a question. This simple procedure does not work if the function I'm after is buried in another function. Have any ideas how to get this to drill down?

function PPP_QuickPick(inst)	if inst.components.pickable then		inst.components.pickable.quickpick = true	endend---------------AddPrefabPostInit("sapling", PPP_QuickPick) -- worksAddPrefabPostInit("grass", PPP_QuickPick) --local function fn(Sim) doesn't work
  • Developer

@Ipsquiggle, have a question. This simple procedure does not work if the function I'm after is buried in another function. Have any ideas how to get this to drill down?

function PPP_QuickPick(inst)    if inst.components.pickable then        inst.components.pickable.quickpick = true    endend---------------AddPrefabPostInit("sapling", PPP_QuickPick) -- worksAddPrefabPostInit("grass", PPP_QuickPick) --local function fn(Sim) doesn't work
That code seems to work for me in both cases, I can check that components.pickable.quickpick == true for either a grass or a sapling after running this.

The nested functions shouldn't have an effect, as the Prefab() gets fully resolved and instantiated before the PostInit functions get run.

Maybe try copying just those 8 lines to a fresh mod and see if it works for you without error? That'll at least let us know if there's something broken with this functionality or if the problem lies elsewhere..

[MENTION=55]Ipsquiggle[/MENTION], have a question. This simple procedure does not work if the function I'm after is buried in another function. Have any ideas how to get this to drill down?

function PPP_QuickPick(inst)	if inst.components.pickable then		inst.components.pickable.quickpick = true	endend---------------AddPrefabPostInit("sapling", PPP_QuickPick) -- worksAddPrefabPostInit("grass", PPP_QuickPick) --local function fn(Sim) doesn't work
I'm a bit confused by what you mean by "if the function I'm after is buried in another function."Is PPP_QuickPick(inst) the "function you're after"?What does fn(Sim) have to do with it? (I'm guessing you're talking about the individual initializer for the grass prefab)What the AddPrefabPostInit does, is once a "grass" prefab gets initialized (IE: after makefn(stage) got called) it runs PPP_QuickPick(inst) where inst is the grass that just got initialized. So:grass.lua:118 calls grass("grass", 0)so grass.lua:115 calls Prefab("forest/objects/grass", makefn(0), assets, prefabs)so grass.lua:59 calls fn(Sim) with a local stage==0 (if stage were 1 it would need fertilizer)then fn(Sim) terminates, and makefn(stage)terminatesThe mod manager has added the post init functions to the prefab registration and so then it runs PPP_QuickPick(inst) where inst is the grass entity that just got initialized. If the local function fn(Sim) wasn't working, your grass wouldn't even appear. It's that function that tells the game what animations to use, and set all of the pickable settings. More important, it is what actually creates the entity.

Ruby, please do the conversion again and make sure that pre-multiply alpha is turned on in TexConverter.

What happens is: A pure white pixel that is completely transparent will show up in game as a pure white pixel if you didn't pre-multiply alpha. If you moved the texture and your paint program filled the empty space with white, and you erased it, (or if your paint program filled it with 0% opacity white) it will still show as white when it's converted.

When you pre-multiply alpha, a 0% opacity white turns to 0% opacity black. This is why the rest of your image is transparent. It wasn't disturbed. But where you shifted it around, or modified it, the transparency is wrong.

Oh I'm just wondering what will be different if I fill the box, and you give me the answer. Thanks! I must have a try.

By the way, do you know how the other box works?

I believe you sent me the wrong tex files. I was talking about those in the anim zip'sEdit -- Well if you get the anims to work properly no need to send them ;) Edited by kiopho

I believe you sent me the wrong tex files. I was talking about those in the anim zip's

Oops, I'm sorry.http://rapidshare.com/files/618663850/armor_sanity.ziphttp://rapidshare.com/files/1368123724/swap_nightsword.ziphttp://rapidshare.com/files/3035861950/nightsword.zipEdit: Well, I did edit the files thousands times and not sure whether the screenshots come from the files, but at least the armor_sanity one. Edited by Ruby~~

Mip-mapping is good to check because ipsquiggle has said so, but probably less important.What mip-mapping does is it creates various scaled down images of the texture to store along with it. This means that it can create better looking images at smaller sizes. If the mipmaps aren't generated, then it is up to your video card to either create them or do extra work when they resize the images.Since it's unusual for a texture to be seen at a much lower resolution than it's created at, it's probably less important. However, if that does happen, it could lead to ugly or incorrect looking scaling. Video cards will mostly handle this fine. However, you'll probably get more reliable results if the mipmaps are pre-generated. I'd still check it though, it will make things work more reliably and doesn't hurt anything, except maybe make the file slightly larger.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...