how do you tell a program to do a set function?

Started by smileyman8b, July 06, 2014, 02:08:26 pm

Previous topic - Next topic

smileyman8b

July 06, 2014, 02:08:26 pm Last Edit: July 06, 2014, 03:11:38 pm by smileyman8b
so this has nothing to do with the famicom but i play skyrim on my xbox 360 since i cant afford a gaming pc and unlike mods on pc its a bit more complicated to get them on there but ive already converted a couple of mods such as convenient horses and stuff and its not hard to do its just really time consuming because of two steps

1. you have to open the meshes in a program called nifskope then you have to look on the left hand side for a tab called "nitrishapedata" then you expand that tab and look for "num uv sets" if its set to 0 or 4097 then leave it alone if its set to 1 then set it to 4097.

now while that might might not seem like much there can be about 200 meshes give or take and in each mod (big ones) and meshes when opened in nifskope can have up to 500 tabs on the left tab sometimes that you have to look through  :P

2. open the textures in paint.net and resize all of them to no bigger than 256 (sometimes can do 512)

this ones really not that bad

but my questions is how would i tell the program (nifskope) to:
look for tab nitrishapedata
if it doesn't find nitrishapedata then save and close the mesh
if it finds nitrishapedata then expand and look for num uv sets
if it doesnt find num uv sets then search for the next nitrishapedata tab
if it does find num uv sets then check value of them
if value of num uv sets is equal to 0 or 4097 then search for the next nitrishapedata tab
if value of num uv sets is equal to 1 then set to 4097 then search for the next nitrishapedata tab
if there are no new nitrishapedata tabs then save and close mesh

and how would i tell paint.net to
resize all selected files to no bigger that 256 in length or width while keeping proportions

(im on windows 7)
i doubt any of you will be able to give me a straight forward answer but what im hoping for is that you could either tell me
oh well you would need to use this coding language or you'd need to make/ edit a .dll
or youd need go to this forum and ask they would be able to help you
cause all i really need to know is where to start im not expecting someone to spoon feed me  :D


Deadpool- "YOU ATE THE LAST OF THE CHEESY PUFFS YOU SON OF A BI+cH!"  >:(

UglyJoe

When I want to automate stuff, I look for a few things: a command-line interface, batch processing, or an API.

A quick Google search shows that NifSkope doesn't have a command line interface, but it can apparently do some batch processing per file "via the Spells system in the context menus."  I'm unfamiliar with NifSkope, so I don't know if that'll be able to do what you want or not.  It apparently also has an API, but that's only helpful if you know how to code.

As far as resizing your images goes, Paint.NET surely has batch processing for that.  Another quick search turns up this: https://pdnbulkupdater.codeplex.com/.  It might have those sort of features built-in, but maybe not (been years since I've even looked at Paint.NET).

smileyman8b

thanks for the help!  :)
but the batch doesnt seem to have what i need and im pretty unfamiliar with this program too as ive only used it for this specific task  :-[
although the info bout the API is a start, would coding for that be hard to learn or generally useful if i did spend the time to learn it? so far ive only coded in visual ways like with kismet in UDK of which im pretty sure coding in non visual ways is alot harder  :P
also that bulk uploader can only resize every image to a set size and does not have a if less/greater than option but ill look more into it and programs of the like.
but like i asked for this is a start so thank you once again!  ;D
Deadpool- "YOU ATE THE LAST OF THE CHEESY PUFFS YOU SON OF A BI+cH!"  >:(

UglyJoe

Quote from: smileyman8b on July 06, 2014, 08:35:24 pm
although the info bout the API is a start, would coding for that be hard to learn or generally useful if i did spend the time to learn it? so far ive only coded in visual ways like with kismet in UDK of which im pretty sure coding in non visual ways is alot harder  :P


The usefulness and friendliness of APIs vary wildly, although for niche projects they tend to not be very well documented (and thus hard to use without putting forward substantial effort).  I'm not at all familiar with this one, so I can't answer your question.

Quote from: smileyman8b on July 06, 2014, 08:35:24 pm
also that bulk uploader can only resize every image to a set size and does not have a if less/greater than option but ill look more into it and programs of the like.


Ah.  Well if it were me doing it, I'd use Cygwin, ImageMagick, and some Bash scripting.  That's hardly user-friendly, though, so I'm not sure I'd recommend it unless you know your way around a Linux terminal.

Quote from: smileyman8b on July 06, 2014, 08:35:24 pm
but like i asked for this is a start so thank you once again!  ;D


Sure.

smileyman8b

 http://niftools.sourceforge.net/doc/nifskope/
thats the link to the documented API, it seems complete but its just like a bunch of gibberish to me  :-[
but THIS is where the fun begins  ...........(5 seconds later) :'( yeah im screwed wait but i used to use this one program and make mods for blackops zombies for me and my freinds to screw around with offline when we got bored of the actual game and you had to use this one program..... Xero! thats what it was and you had to code everything out like wait i think i still have my old one, here it is:

gpad_buttonsconfig z
BIND BUTTON_BACK "r_debugLayers 1;cg_tracerlength 999;cg_tracerspeed 0020;cg_tracerwidth 15;cg_gun_x 7;cg_drawfps 1;player_burstFireCooldown 0;setperk a specialty_bulletaccuracy;perk_weapratemultiplier 0;god; player_meleerange 999;player_meleeWidth 999;sf_use_ignoreammo 1;magic_chest_movable 0; player_sprintUnlimited 1;player_sustainAmmo 1;player_clipsizemultiplier 999;give ammo;r_fog 0;cg_fov 70;player_weapspread 0;r_znear 35;g_gravity 999;jump_height 999;BIND BUTTON_START give weapon_defaultweapon_zm;give thundergun_upgraded_zm;give ray_gun_upgraded_zm;give knife_ballistic_bowie_upgraded_zm;"
BIND DPAD_DOWN dropweapon;BIND DPAD_RIGHT toggle r_fullbright;BIND DPAD_UP noclip;BIND BUTTON_LSHLDR toggle r_colorMap 1 2 3 0; BIND BUTTON_RSHLDR toggle timescale 1 .1 5

if API is similar to that then i might already have some of it down  :)
Deadpool- "YOU ATE THE LAST OF THE CHEESY PUFFS YOU SON OF A BI+cH!"  >:(