SC4 Devotion Forum Archives

Sim City 4 Devotion Tools => Tools - General Discussion => SC4 Model Tweaker => Topic started by: cogeo on April 11, 2009, 02:54:33 PM

Title: SC4 Model Tweaker Development/Support thread
Post by: cogeo on April 11, 2009, 02:54:33 PM
Hi all,

As I had mentioned some days ago, I'm working on a new tool to aid custom content development. Its name will be "SC4 Model Tweaker". Initially it's going to support two functions:

- Scaling of S3D files. This was initially intented for making HD props, but as SimFox has found another solution (updating the BAT scripts), the feature is currently unneeded for these. But it can find other uses, eg as a general scaling tool. See an example in the next post.
- Setting/removing (semi)transparency setting from S3D files. Now quite a few BATters know how to make transparent BATs, however the process involves a very tedious procedure, ie setting the blending parameters in the S3D files manually. This feauture automates this task.

Below is a screenshot of the new tool:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg95.imageshack.us%2Fimg95%2F9033%2Fsc4modeltweaker.jpg&hash=67fc70516aef7b7805d2975f95d22ca84d0dced8)

As you can see, it features a standard user interface, so custom content developers won't have any problem using it.

I could add some more functions if desired. One note though, these can only be of the "S3D files manipulation" type, as the tool is written in such a way. I wasn't aiming at replacing the reader, instead the above features should be better included into the reader, but the reader is rather impossible to be rebuilt (becasue of a missing library).

I could also send intermediate/test versions to anybody interested. The beta version will be ready by the middle of the next week.

If you have any requests, wishes etc, pls post here.
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: cogeo on April 11, 2009, 02:57:11 PM
Here is an example of use of the model scaling feature:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg95.imageshack.us%2Fimg95%2F2451%2Fsc4nppx2.jpg&hash=3368b69157eb01254fd0a4327ec3b04cfe117412)

It's the Maxis nuclear power plant model, scaled x2. I always thought that this model, though quite good actually, is unrealistically small. The people in the pic are two times taller than the door. And the (original) bldg/lot is only 4x4 tiles large, ie quite small for a NPP. I think the new one looks better (as far as the size is concerned), though it could be possible to try other scaling factors too, like 1.5 or 1.7.

Now about the textures, of course they look more pixelated, as they were for a smaller model. But this model was made in just minutes. If some "refishing" is applied too, the textures can be improved, at least the jaggies can be eliminated.

I have attached the model file shown in the pic, together with a propfile, for everybody who wants to take a look.

I had released a set of NPPs in the past. Not any new models (just "lots"), but that pack was quite successfull, basically due to its usefulness (a set of large NPPs, at different capacities and costs). One could make basically the same, but instead using this (magnified) model, and improvong the lots too, eg put some electric trickery, better parking etc. In such a case pls post in some forum, so that we avoid making duplicate work.
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: Pat on April 11, 2009, 04:01:35 PM
So this tool would still take some knowledge and not for the beginner I take it?
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: mattb325 on April 11, 2009, 04:45:31 PM
This looks like a great idea....I know of plenty of under/overscaled items that would benefit from such treatment
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: null45 on April 11, 2009, 05:58:02 PM
QuoteI wasn't aiming at replacing the reader, instead the above features should be better included into the reader, but the reader is rather impossible to be rebuilt (becasue of a missing library).

I assume the missing library you mean is "3dsftk.lib"
That is the 3DS File Format Toolkit (http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=7481394)

The 3dsftk libraries from the link above were built with Visual C++ 4 so you have to edit the makefile & rebuild.

Or you could use the version linked to by ilive which is http://little3d.free.fr/download/3dsftk.zip (http://little3d.free.fr/download/3dsftk.zip).
That version does not need to be recompiled.

After that the reader compiles fine. ;)
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: Jonathan on April 12, 2009, 12:41:39 AM
You mean you just made it possible to make the reader better!?!?!
Sure you not from EA or Maxis?

Cogeo,
What I was suggesting is in the mats tab (in the reader) there is the option to change several settings, as to how the texture is displayed on S3D file in game. I was hoping you could extend this tool to be able to change the settings of [/multiple] mats in multiple S3D files, saving you going through every S3D file and changing it. Is this possible?

Jonathan
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: null45 on April 12, 2009, 07:09:14 AM
QuoteSure you not from EA or Maxis?

No, what makes you think that? 

As to how I know about the 3DS File Format Toolkit, it was mentioned by ilive over in this (http://www.simtropolis.com/forum/messageview.cfm?FTVAR_FORUMVIEWTMP=Linear&catid=41&threadid=42353) thread on Simtropolis.    ;)
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: wouanagaine on April 12, 2009, 09:57:17 AM
Great job Cogeo  :thumbsup:

The scaling have a great number of applications, thanks for that

One wish, if you can, add a way to tweak the UV mapping when scaling, sometimes I need to scale the vertices, and the uv need to be scale also ( instead of letting them the way they are in 99% of case )
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: JoeST on April 12, 2009, 10:10:59 AM
fantastic sounding tool Cogeo :) thanks for sharing :)

Joe
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: jeronij on April 12, 2009, 10:39:19 AM
These are most excellent news  :thumbsup:

I'll follow the development with interest. Specially the "refishing" part  ;)

I am sure you wont forget to include a transparecy manager in this set of fantastic tools as well  ;D  ::)  $%Grinno$%
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: cogeo on April 12, 2009, 03:13:29 PM
Thank you all for the nice comments!

@Pat: Errr... yes, this tool is basically for automating repetitive and tedious procedures that you would normally do with the reader.

@null45: Thanks for the info! Actually I did attempt to rebuild the reader, and the aforementioned library was the missing bit. There is also another point, reading and understanding the reader's code is a quite an amount of work. One would have to understand it in some depth before attempting to implement new functions. For example, some functions depend on the items selected, eg in order to perform a scaling the user should select all 20 Z/R S3D files of a model (if the model has 20 S3D files) otherwise the operation should not be permitted. The reader's current implementation works on individual files though. Instead in this tool, S3D files are grouped, as you can see in the pic, and you can only select a whole model, ie 20 S3D files (or 1 S3D file, for models with 1 Z/R). Rebuilding the reader would require a lot of testing, as it is the main modding tool. But I'm considering making a special release with mininal and local changes, requiring in-place fixes. Point I would like to improve are some annoying little features, like how lists like Occupant Groups, or Transit Switch Entry Point are displayed, ie nothing really "great". These are quite easy and safe to change.

@Jonathan (warrior? - so account names can be changed?): could you pls be a bit more specific? ie which settings you want to change and what are the changes you want to make?

@wouanagaine: I don't understand how you want to change the UV values. These are numbers in the range 0.00..1.00, denoting the realtive position of each point in the texture image, ie even if you resize a texture the UVs should remain the same.

@jeronij: Thanks! - See the button in the pic?

Another function I'm considering is merging of models, there are cases where this is needed, eg it is known that the Resource Key Type 4 property has problems with the shadows, and it might be useful for making models for bridges.

---
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: Ennedi on April 12, 2009, 03:28:00 PM
This will be an excellent tool cogeo! &apls

I have a request: an ability to rotate the model by a custom angle. Rotating by 45 degrees would be especially useful, but it would be also good to be able to make a model parallel to FAR/FARR network pieces. It would be the best to be able to choose any angle, recalculation of vertices coordinates needs using relatively simple trygonometrical functions.

Would it be possible? :)

Adam
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: Jonathan on April 12, 2009, 03:31:57 PM
Quote@Jonathan (warrior? - so account names can be changed?): could you pls be a bit more specific? ie which settings you want to change and what are the changes you want to make?

Being able to change all these settings, across multiple S3D files (including the actual textures [so like "set all group 0 materials to 0x0ABCDEF9"])
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi200.photobucket.com%2Falbums%2Faa230%2FwarriorST%2Fmatstab.jpg&hash=86955cb18db3ce35d0495e1330a3b80103475dc1)

Also now I'm not sure what you mean by grouped, can you choose the groups?

QuoteAnother function I'm considering is merging of models, there are cases where this is needed, eg it is known that the Resource Key Type 4 property has problems with the shadows, and it might be useful for making models for bridges.

One feature that would be amazing, is creating previews, in puzzle pieces it is all split up into 16x16 segments, but the previews have to be all these segments put to together to form one big model. And you have to move each segment by copying the coordinates into excel and then copying them back(after putting a formula on them) which gets a bit boring when doing lots of puzzle pieces.  Is that what you mean by merging models?
btw, I realise not everyone needs/wants this, so if you do at all, put it last on the to-do list :)


Also we've noticed that in game some model display the textures differently (ie how the alphas are done, and if it has gradients) yet have the exact same settings in the reader and the same textures. Which makes you think if there are some settings for S3D files that the reader does not have "in it's UI".

What we really need is a modding tool that can do everything, the best bits from all of them in one tool :)
(and yep I am warrior)

Jonathan
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: cogeo on April 12, 2009, 03:41:12 PM
Adam, what you are asking for is not possible, I'm afraid. S3D files for normal BAT models (w/ 20 Z/R), contain only the polygons that are visible in each view aspect, ie the "back" faces are removed, obviously for optimisation. So this would only be possible for models with one S3D file, and actually not for all of them, only for those with "full geometry", like the automata models. If someone has a different opiniion or idea, pls post.
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: Ennedi on April 12, 2009, 03:57:54 PM
You are right cogeo, I checked it. That's a real pity.  $%Grinno$%

Adam
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: SimFox on April 12, 2009, 04:44:14 PM
Quote from: Ennedi on April 12, 2009, 03:57:54 PM
You are right cogeo, I checked it. That's a real pity.  $%Grinno$%

Adam
besides, the FSHs are view dependent. so even if you rotate something and the face is there (for instance for a small angle) the look will immediately become distorted.
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: Ennedi on April 12, 2009, 04:54:31 PM
Quote from: SimFox on April 12, 2009, 04:44:14 PM
besides, the FSHs are view dependent. so even if you rotate something and the face is there (for instance for a small angle) the look will immediately become distorted.

I was thinking exactly in the same way ie. "what if I would rotate the model by less than 45 degrees?" I rotated the model view and saw the distortion. You are absolutely right.  $%Grinno$%

Adam
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: wouanagaine on April 13, 2009, 01:20:03 AM
Quote from: cogeo on April 12, 2009, 03:13:29 PM
Thank you all for the nice comments!

@wouanagaine: I don't understand how you want to change the UV values. These are numbers in the range 0.00..1.00, denoting the realtive position of each point in the texture image, ie even if you resize a texture the UVs should remain the same.
This is for some special stuff, and UV can  be outside 0..1, that is where the 'UV Wrap' mode "repeat" is interesting


Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: cogeo on April 13, 2009, 09:23:06 AM
Hi again,

I have made a pre-release version, which you can use for testing and evaluation.

It can be downloaded from the following link: <Get the official version from the LEX (http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=2072)>


Some Notes:
- Currently only the scaling function is implemented. The tool should successfully recognize all S3D models, and skip all other file types (these should be saved unchanged).
- In almost all cases (as a result of operations) the filesize will need to be changed. The tool doesn't yet rebuild the DIR file automatically. For the time being this should be done in the reader, after you're done. I think the reader does this automatically upon save, ie you don't need to do this explicitly, just open and save. Anyways, the DIR file isn't a critical one, so most tools (and the game) will work normally, even if you don't.
- The help file is the default file generated by the compiler, so many items are missing. But it does contain help for the standard commands.
- The program doesn't change file associations for any file type (it's not a main modding tool, so this wouldn't be right). However it's quite simple to use, you can use the standard File Open command, or drag-and-drop.
- All information in the registry is stored under "HKEY_CURRENT_USER\Software\Cogeo\SC4 Model Tweaker". To fully uninstall the tool, you have to delete those entries too.
- No installer for the time being, you have to copy the files under a new folder and create a shortcut manually.

Please report your findings in this thread.
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: SimFox on April 13, 2009, 12:29:19 PM
so, no transparency enable in this release?
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: cogeo on April 13, 2009, 02:33:50 PM
Replies to your posts:

@Jonathan: Pls get the tool as is, and take a look. Then it would be easier to describe what exactly you want. Changing the texture for Group 0 (or Group X, in general) is quite risky - assumes that all S3D files contain the same number of Groups, ie groups of the same order (with the same number) in each S3D file contain a "similar" model. This is not a safe assumption for normal BATs (20 Z/R) as the model(s) may be split into more than one groups for closer views; actually this may occur with 1-Z/R models too. Btw by "grouped" I meant grouping of 20-Z/R S3D files into one, as you can see in the pic (the minimum object that operations can be applied on is the whole model, ie in the case of a 20-Z/R model, they can be applied on the whole model only). Also by "merging" of models I meant append one model to another. Generating previews is something similar, though a bit different, ie requires also shifting of the models to be appended.

@wouanagaine: I see. Could you describe in more detail what exact transformations you want? Also send me a sample file, if you have a unmodded version and a modded one, so much the better.

@SimFox: not yet, but I'm working on it  :)
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: buddybud on April 13, 2009, 04:33:51 PM
wow this awsome...thanx alot  :thumbsup:

bud
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: Jonathan on April 14, 2009, 12:15:33 AM
Cogeo, I downloaded it very nice work  :thumbsup:
What I'd like to be able to do is,
set the Wrap mode U & V(or any of the other settings I showed in that picture) to clamb (for example) on all the S3Ds I select.
Changing the texture of a group is more a network model thing, but could be like:
If material name = xxxx then change material IID to 0x12345678
or could be like:
If material IID = 0x12345678 then change material IID to 0x87654321

Jonathan
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: wouanagaine on April 14, 2009, 01:15:58 AM
You can see it in my lake picture on 3RR, I've took a plopable water S3D that I scaled by 100, however if I left the UV the result is ugly as the such a magnification result in horrible pixelisation of the FSH used. I then scale the uv by 100 also and set the UV wrap method to "mirror". Same method can be used on NAM pedestrian tiles, scale it by 10 and scale it by 10 also on uv
This is of course very specific and only interesting for such S3D files.

Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: Jonathan on April 14, 2009, 01:55:01 AM
There's a mirror setting on S3D files?
EDIT: That's what I meant, in the reader I only have clamb and repeat?
So that's how you did it ;)


Jonathan
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: wouanagaine on April 14, 2009, 01:57:53 AM
Quote from: Jonathan on April 14, 2009, 01:55:01 AM
There's a mirror setting on S3D files?
So that's how you did it ;)
There is a mirror setting on the UVs on how to handle UV outside the 0..1 range

Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: cogeo on April 15, 2009, 01:53:26 PM
Hi again,

A new version of the tool is going to be made tomorrow. The Set Transparency command appears to work , and generates a report with all actions taken. Also the list is now sortable (by Num, IDs and Z/R), and the selection remains highlighted while setting the options.

@Jonathan: Still don't understand, while setting wrap modes is simple, the other operations you are asking for are a bit tricky, I would say, and rather not well-specified. What's the point of setting the materials for ALL models to the same value? Won't you still have to go and edit them one by one? Also the material name is not realiable information, often modders change the TGI only, and not the name. Maybe a more meaningful operation would be to set the material for the selected items to be the same as the Instance IDs (and Group IDs, for 20-Z/R models). I think you will have to specify in more detail not only the operations, but the tasks (procedures) you wish to automate. Also you said about some features that you think they are not in the Reader's UI. Could you be more specific, it would be interesting to examine them in some more depth.

@wouanagaine: Can't find them! Pls provide some links, and specify the operation(s) in some more detail. If it's something simple, it could be done even tomorrow.

I would welcome any help from anybody having a deeper knowledge of S3D files. The programming interface is quite strange. It returns a list of materials (groups), for which you can set the options, but each of these elements then contains another... list, which makes little sense to me, I mean it should rather be a single element. The reader's UI is implemented this way too, ie you can onlt have one mat (TGI/name) for each mat group, no a list! I checked the models in simcity_1.dat, and in almost all of them the aforementioned list contains exactly one mat (TGI/name). I have found some few ones with no mats (?) in the second group, ie these appear to be empty!. Also I'm not sure if the number of vertex blocks must be the same as the number of Anim and material blocks (1:1 correspondence). Again, this IS the case for most models, but in quite a few ones, these differ. Is this OK, or instead a result of programming/modding errors?
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: Jonathan on April 15, 2009, 02:55:28 PM
Well when there are transit models often you need to change multiple mats to a certain texture.
For example overpasses, changing the networks that go under them, you copy the first S3D (so the mats are in the same order, have the same ID and same Mat name) and then have to manually change each mat to the next network that goes under the overpass. Get my example?
I'm not sure what you mean by tasks and not operations?

A setting not in the reader's UI I found(not sure if anyone else has found it though?)
Quote from: from me in the NAM board
On the rail under maxis hwy the alpha has the gradient displayed properly but on other models (such as el-rail and monorail over rail) it doesn't even though all settings in the reader's UI are identical, I now found the byte(?) that change to get the gradient so you have edit the file manually using hex.
Top(monorail) is before, bottom(el-rail) is after.
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi200.photobucket.com%2Falbums%2Faa230%2FwarriorST%2Fblend.jpg&hash=cafe9fcb29656c312ac1181936db3e26a635d1cc)
Right Click S3D file,
Hex editor(decoded file)
Scroll down to the MATS section (says MATS on the Acsii column)
Then find the texture needed to be changed, in this case "STR Orth"
Then go back up along the hex till you get to"FF 7F" then change the 7F to 00 (The FF didn't seem to have any effect, but in the highway over STR model both FF and 7F were 00s, so the affect of FF needs to be tested further)
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi200.photobucket.com%2Falbums%2Faa230%2FwarriorST%2FHE.jpg&hash=151f7930b544fcf2360274c6146291a0768dc0a0)

Maybe there is some option in there to make the brightening not occur?

Jonathan

Changes how the alpha is used (allows the greys, so semi opaque)

Jonathan
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: sithlrd98 on April 15, 2009, 03:11:46 PM
Hello Cogeo ,
I have been trying out this new tool , hoping that it would save me the frustration of model resizing. However , since I am not a BATer , I am stumbling with how to downsize a model that I think is way too big. I don't fully understand how to do this since I am not exactly sure that this tool can do it.I know enough to know that I don't know what I'm doing and this seemed to possibly be easier than the MODding rendered SC4Models tutorial.

Jayson
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: cogeo on April 15, 2009, 03:20:24 PM
It shouldn't be so hard:
- Backup your model (or dat) file
- Open the file (or drag-and-drop it on the tool)
- In the list, select (highlight) the model(s) you want to resize.
- Click the resize menu or button, and specify the scaling factor.
- Save the file and exit.
- Open the file in the reader and save it again (newer versions won't requir thiis).
These should be enough. Make sure that no copies of the (old) model exist in your installation (possibly overriding the modded one).
Pls let me know the results.
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: sithlrd98 on April 15, 2009, 03:53:08 PM
OK , at least I know I was doing it correctly  :)

So , I had already done this the other night and here is what I noticed:first , I was'nt sure which direction to go so I chose decimal factor of .75
Of course I saved and , using DatGens model viewer ,  checked out the first S3D of the resized and the original and noticed that , on my default zoom 3 , there visually is a difference as the changed model does appear smaller although both model files are the same size.(checked in reader , re-building the dir). Opened up in LE and even though the model looks smaller , the "bluebox"foot print is still as large as the original...(my explanation make sense?) So , I decided to manually change the XML that PM uses to create a new .desc.....no luck.
LE:
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi180.photobucket.com%2Falbums%2Fx262%2Fsithlrd98%2FLE-1.jpg&hash=68fff5e07b90dbf91226b06ba52e74646df98200)

Here is the model in reader , original on right , so the model is smaller! Just can't fill in the blanks!
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi180.photobucket.com%2Falbums%2Fx262%2Fsithlrd98%2Fresize.jpg&hash=9119d078224242704152c4d7fdf058c0547db2d8)

Jayson
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: cogeo on April 15, 2009, 04:15:23 PM
I see. Some notes:
- There is no difference in which form of scaling factor you choose. Use the one that's mostly conenient to you. The 0.75 factor could instead be entered as a 3/4 fraction, it's the same.
- Completely forgot about the XML. However, the only thing this affects is the (default/original) prop/building size set by the PM - only the PM apprears to use this, and you can change this in the reader if you wish.
- To change the footprint of your building or prop (gray and blue rectangles, respectively) use the reader and change the Occupant Size property accordingly. There is no propblem if you specify a different (usually smaller) size, actually this technique is used by many BATters/modders for making overhanging props (in this case the actual model is much larger than what Occupant Size saiz). The only thing this affects is the size of the rectangle in LE (Tip: never make it exactly as large as the Lot, this may cause the dreaded Immortal Lot Syndrome). It's impossible for this tool to chaeck ALL exemplars that may be referencing the model (and it wouldn't be desirable either), so you have to make this yourself.
- Changes won't be reflected immediately in the (old) lots, for props you have to delete them and place them anew, while for buildings click Replace (and select the same building again).
Hope this helps.
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: sithlrd98 on April 15, 2009, 04:35:35 PM
OK , so I forgot about the Occupant size ,I feel real dumb right now!  It worked almost perfectly as I see that I'll have to tweak the model size slightly , but thank you so much for this tool!!!!!! Its right up there as a much valuable as any tool I've used!

Jayson
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: cogeo on April 16, 2009, 09:31:46 AM
Hi again,

I have just uploaded a newer version of the tool.

The download address is <Get the official version from the LEX (http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=2072)>


Features and changes:
- The Set Transparency command is implemented, and generates a report with all actions taken.
- The list is now sortable (by Num, IDs and Z/R), and the selection remains highlighted while setting the options.
- The Help file is updated, all the default/unused entries were removed, and there is some introductory help on using the commands (though not yet in detail).
- The View->Toolbars and Docking Windows->Customize and Window->Windows commands now work.
- Several bugs of the previous versions were removed.

Still need to be implemented:
- In almost all cases (as a result of operations) the filesize will need to be changed. The tool doesn't yet rebuild the DIR file automatically. For the time being this should be done in the reader, after you're done. I think the reader does this automatically upon save, ie you don't need to do this explicitly, just open and save. Anyways, the DIR file isn't a critical one, so most tools (and the game) will work normally, even if you don't.
- More detailed help.
- Installer.

Some Notes:
- The program doesn't change file associations for any file type (it's not a main modding tool, so this wouldn't be right). However it's quite simple to use, you can use the standard File Open command, or drag-and-drop.
- All information in the registry is stored under "HKEY_CURRENT_USER\Software\Cogeo\SC4 Model Tweaker". To fully uninstall the tool, you have to delete those entries too.

INSTALLATION
- There is no installer for the time being, you have to copy the files under a new folder and create a shortcut manually.
- If you had installed the previous version you will have to open the registry editor (in your Windows Taskbar select Start->Run, and type-in regedit), go to  "HKEY_CURRENT_USER\Software\Cogeo\" and delete key "SC4 Model Tweaker" (and its subkeys). This step is required before installing the new version, otherwise some menu commands may not be displayed, as the program stores there the "personalisation" oprions of the old version. Then overwrite the installed files with the new ones.

Please provide your feedback or suggestions.
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: jeronij on April 16, 2009, 01:37:51 PM
Hello cogeo,

First let me thank you for the development so far of this fantastic tool  :thumbsup: . As soon as I saw this sentence: "- The Set Transparency command is implemented, and generates a report with all actions taken." I downloaded and tested it  ;D

I havent had any problem during the installation and execution of the tool. I could open my model and set the transparency for all the zoom levels. The tool did its task quite well, and the model was correctly set to transparent.

However, I have an special need for my current models (transparent plopable water) because they will be placed in a way that they may overlap, and we dont want to see these joints  ::) . I used to manually set the "Depth Func" property to "Less than", which gives me the best result for my models, making the joints almost invisible... would it be possible to add some more options to the transparency tool, which would allow for a more adjusted parametrization, like the one that I am mentioning...  ;D ?

Anyway, thanks for your efforts, and for giving us a so fantastic tool, which will allow a much richer modding environement  :thumbsup:
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: cogeo on April 16, 2009, 02:55:07 PM
Replies to your posts:

@jeronij: Thanks for the nice comments! One question, are these files normal BAT models, ie w/ 20 Z/R views, or with just 1, using the kSC4BuildingModelRotationProperty? (this makes much more sense to me, as these are just flat shapes). This would be quite easy to change, ie the DepthFunc value could be parametric. The transparency tool should be changed too, to allow setting transparency for 1-Z/R models as well.

@jonathan: I still don't understand what you need a "filter" for, like "If material name = xxxx then change material IID to 0x12345678" or "If material IID = 0x12345678 then change material IID to 0x87654321", shouldn't it be enough to set the material for selected items (I mean don't you have control over it)?. As for those things that are not in the reader's UI, I would need the modded and unmodded file, to see what that FF really does.

@wouanagaine: Pls specify the desired opetations in more detail, and send me a unomoded and modded example. I don't know what the "mirror" setting is (value pls?), it's not in the reader's UI either.
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: jeronij on April 16, 2009, 03:16:05 PM
Quote from: cogeo on April 16, 2009, 02:55:07 PM
Replies to your posts:

@jeronij: Thanks for the nice comments! One question, are these files normal BAT models, ie w/ 20 Z/R views, or with just 1, using the kSC4BuildingModelRotationProperty? (this makes much more sense to me, as these are just flat shapes). This would be quite easy to change, ie the DepthFunc value could be parametric. The transparency tool should be changed too, to allow setting transparency for 1-Z/R models as well.

The models are standard bat models, 20Z/R. I never tried to use one single model for this... not sure how the game would handle the textures across the different zoom levels in that case.

However I think that anticipation is good, and allowing transparency for 1Z/R models would be much appreciated... just in case...  ;D

Also expanding the transparency parametrization options would be an excellent asset, if it is not too complicated and time comsuming  :thumbsup:
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: cogeo on April 16, 2009, 03:38:57 PM
Using 1-Z/R models can actually be advantageous, because you get rid of BAT and all the distortions it causes (namely the blurring and the "jaggies"). Take a look at network piece in the game, you can see how much better the textures look (against models), despite still being low-res. Ie resolution is not an issue for these, and the model actually uses far fewer resources. They are displayed through such flat models. You can find such models in NAM's ped-mall tiles, they are 16x16 models containing just four vertices. These are quite easy to be enlarged, and use larger textures (or maybe tiled textures). As for the farther zoom levels, I think there would be no problem, but there is still one Resource Key Type X property, specifying a separate model for each zoom level.

What changes dramatically is the development procedure, ie this is not modelling, but actually just texturing - and you can immediately see the effects of this texturing in your models, not wonder and pray about what BAT will finally export.
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: SimFox on April 17, 2009, 03:40:02 AM
Sadly this tool doesn't seem to work in 64 bit Vista Ultimate.
It opens fine, but once I've set all the desired transparencies it appear to be working but then this message pops up:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fs57.radikal.ru%2Fi155%2F0904%2Ffa%2F1deaccd74a27.gif&hash=133eec74b880b7f71e609876082e6d4bca92b1f7)

and program shuts down...

I checked the file I was working on later and no transparencies were set...
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: jeronij on April 17, 2009, 07:45:16 AM
Quote from: cogeo on April 16, 2009, 03:38:57 PM
Using 1-Z/R models can actually be advantageous, because you get rid of BAT and all the distortions it causes (namely the blurring and the "jaggies"). Take a look at network piece in the game, you can see how much better the textures look (against models), despite still being low-res. Ie resolution is not an issue for these, and the model actually uses far fewer resources. They are displayed through such flat models. You can find such models in NAM's ped-mall tiles, they are 16x16 models containing just four vertices. These are quite easy to be enlarged, and use larger textures (or maybe tiled textures). As for the farther zoom levels, I think there would be no problem, but there is still one Resource Key Type X property, specifying a separate model for each zoom level.

What changes dramatically is the development procedure, ie this is not modelling, but actually just texturing - and you can immediately see the effects of this texturing in your models, not wonder and pray about what BAT will finally export.

It sounds like a promising way to study  ;) . I never dealed with s3d's and the Reader, everything looks so confusing when you open all those tabs, compared to a simple exemplar or texture...  ::)  $%Grinno$%  :D :D

I'll make some tries with this time permiting  ;D
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: cogeo on April 17, 2009, 10:17:26 AM
@jeronij: Working with such models is actually easier, as BAT (gmax or 3ds) isn't involved at all. In the pic below you can see a subway station of my Pedmall-Compatible Transit Pack (released on the STEX long ago).

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg218.imageshack.us%2Fimg218%2F5062%2Fpedmallsubway.jpg&hash=02a207896f59ce4c574450141b55b1c275e46829)
(zoom-in to see details)

What is interesting here is that the pavement isn't really a texture, but instead a prop. The model is a simple 16x16 flat model with 1 Z/R. It integrates seamlessly with the pedmall tiles around it, which are actually networks (not lots); and this is expected, as it is displayed in the same way as the puzzle pieces, and references directly the very same texture. If I had just used a lot texture, I would had lighten it up, and then try hard to match the luminosity and contrast exactly, and I might still have issues with differences like "gammas". What is important here is that this model looks MUCH better than the subway, which is pixelated and jagged. And this is quite normal, because the texture wasn't processed in BAT (rendered) but instead used directly after photoshopping (or PSP-ing  :)). I think it would be worth to give it a try.

@SimFox: Really sad to hear this. The problem is that I don't have Vista installed, to test this out. Some things that might help:
- You can send me your model (also describing the steps you have taken) to test it on XP, or test it yourself, if you still have an XP installation. This can tell if the program has a problem processing this specific file (which would them be a good test case), or if it's instead a platform-related issue.
- As far as I know (I may be wrong) Vista has more that one complatibility modes for 32-bit applications; maybe try another one, and U would say check the options for the reader (they use the same S3D.dll).
- Maybe try to modify only one S3D file, and only one zoom level, ie try to break it down, to identify which part exactly is causing the problem.

I could send you test/debug versions (dumping messages) so that we can identify what causes the problem, but this is considerable work and requires synchronisation, ie we should arrange it and be both online for many hours; and the result is not guaranteed, if the problem occurs in a system call or a call to an external library, most probably I will just "conclude" that nothing can be done. Finally I don't know if this is worth all the effort, maybe it would be much more practical to send these to someone running XP, to make the conversions for you.
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: sithlrd98 on April 17, 2009, 10:45:43 AM
Just to let you know , the program does run fine under x64 XP , but I have not tried under my x64Vista install yet.

Also , I was wondering if you had any plans to include an easier way to center of-centered props and vice versa?(that would almost be the holy grail!)

Jayson
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: cogeo on April 17, 2009, 11:08:23 AM
I haven't really considered doing this. It's actually something very specialised, a niche, i would say. Do you think it's really worth? How many off-centered models do you have to process?
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: jeronij on April 17, 2009, 12:00:20 PM
Cogeo, thanks for your tips about 3ds's  :thumbsup:

Btw, I'd say that sithlrd98's suggestion would also be a very nice one. Imagine the situation (one of my ongoing projects) --> I want to float a small fleet of fishing boats.... only buildings, no props, can be placed on the water. There can be only one building per lot. Most of the existing boats props are offset to adjust to their respective original lots... I just can dream a solution which would allow us to relocate the offset props to our convenience, and then merge several models into a single one (the small flet) and make my floating building ¡¡¡... I think such a tool would be a really unvaluable help for all the devoted lot makers and modders out there  :thumbsup:
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: buddybud on April 17, 2009, 01:07:12 PM
This is some excellent work. I was wondering if it would be appropriate to include an ability to either flip or rotate models also. This would be great for network models. You would have to apply trig functions to the vertices for the transformation and either alter uv settings or triangles to deal with textures.

Just a thought.

Bud.
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: cogeo on April 17, 2009, 01:55:20 PM
Hi again,

I have just uploaded a newer version of the tool. The executable should now be very close to what I had originally coceived as Version 1.00. It should be working without problems, so by now please report any of your findings as bugs or omissions.

The download link is <Get the official version from the LEX (http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=2072)>


Changes from the previous version:
- The Set Transparency command now applies to 1-Z/R models too, and has an additional option for the "Depth Func".
- The program now re-creates the DIR file, if needed.
- The Help file is updated, all unneeded topics were removed, and there is now  help on using the commands and explaining the operations (there is still quite much work left).

Still need to be implemented:
- In the help file complete some missing or incomplete topics - I would welcome any contributions here.
- Installer.

Some Notes:
- The program doesn't change file associations for any file type (it's not a main modding tool, so this wouldn't be right). However it's quite simple to use, you can use the standard File Open command, or drag-and-drop.
- All information in the registry is stored under "HKEY_CURRENT_USER\Software\Cogeo\SC4 Model Tweaker". To fully uninstall the tool, you have to delete these entries too.

INSTALLATION
- There is no installer for the time being, you have to copy the files under a new folder and create a shortcut manually.
- If you are upgrading from version 0.80, no other actions are required.
- If you are upgrading from version 0.50, you will have to open the registry editor (in your Windows Taskbar select Start->Run, and type-in regedit), go to  "HKEY_CURRENT_USER\Software\Cogeo\" and delete key "SC4 Model Tweaker" (and its subkeys). This step is required before installing the new version, otherwise some menu commands may not be displayed, as the program stores there the "personalisation" oprions of the old version. Then overwrite the installed files with the new ones.
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: sithlrd98 on April 17, 2009, 07:49:14 PM
Its not so much quantity of models , its actually doing the grunt work! See, I was wondering if , since you have an app that can do the first  part of what this tutorial MODding rendered SC4Models (http://sc4devotion.com/forums/index.php?topic=4093.msg128208#msg128208) can do , I was hoping that maybe,possibly,the second part (http://sc4devotion.com/forums/index.php?topic=4093.msg128642#msg128642) could also be automatic , even though  I am only messing with a small model presently , but would like to get into some of the heavy stuff! I don't necessarily mean having the program re-assign new IIDs for the s3d or FSH files ,(if you want both) since in reality this would create a new model... that's the easy part!
Please keep in mind that I am not a BATer, and only have 1/10000000% knowledge that some of the others who are/have commented on matters such as this, I am only curious since you and other programmers can make some very useful tools , which is very cool , and very appreciated!

Jayson





Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: cogeo on April 18, 2009, 03:04:41 AM
Replies to your posts:

@sithlrd98: Maybe this could be done but as a part of a more general "Move Model" or "Shift Model" function. Moving a model is simple and straightforward. But "centering" a model is rather tricky and lacks a definition. How could the centre of the model be determined? I can think of two ways, one based on the extreme x and y coordinates of the (LODshell's) vertices, and another one based on the average x and y of all vertices (kinda "centre of gravity", though strictly speaking the actual centre of gravity (or mass centere) is something different, and very hard to calculate for such models). For models with 20 Z/R views (normal BATs) this is even more complicated, as the models are not "complete", ie they contain only the polygons visible in each specific view (they lack the "back" faces). So the algorithm should examine all 20 Z/R files to determine the centre of the model, and then apply a shift operation with the proper values, so that the centre moves to (0,0). Still, this would work well only for models with symmetrical LODshells with respect to both X and Y axes. For example, it wouldn't work for models like streetlights (centered a the ligtpole). For such models none of the two algorithms would be satisfactory. Any sugestions?

@jeronij: As said above, a "move" or "shift" function is in the plans. I'm considering of a "merge" function too, this would be usefull for making bridges - I think you are aware of the technique of making the road or rail texture a model and merging with the bridges models (resulting in much better-looking network textures).

@buddybud: I'm considering such operations too. For 20-Z/R models this is not possible though, because of the missing back faces. But it is possible to perform another kind of operation (let's call it "Reorientate"), namely renumbering the instance IDs (for example 0x-----400 would become 0x-----410, 0x-----410 would become 0x-----420 and so on). This way it is possible to effectively "rotate" such a model by multiples of 90°. But for 1-Z/R a full rotation (or flipping, or mirroring is possible). For 90°-multiple rotations using trig functions is not even required, and performing simple coordinates changes is the prefered way (for such rotations the sin and cos functions are always 0, 1, or -1). For example, rotating a model by 90° clockwise means just setting x = y and y = -x. Do you really need rotations that are not 90°-multiples? I can only consider 45° for network models, though I really doubt if diagonal models are just orthogonal models rotated by 45°, some adjustments (esp width) are still needed, I think. Also I'm not sure about textures and triangles, shouldn't just moving the vertices be enough?
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: jeronij on April 18, 2009, 04:49:36 AM
Hello again, I donwloaded the .90 versions and installed fine and runs fine as well  ;)

I tried to run the transparency tool in the previously "trasnparented"  ::) ... model, just to change the depth parameter. However, it seems the tool is not able to recognize it now. It does not matter what I try, the tool shows a warning, no changes were made, and this is the error message:
"0x5ad0e817 0xf9730eaa 0x00030000 Mat= 0: No action taken - Unrecognisable settings pattern" <-- one of these for every .3ds
I tried to remove the transparency, and process it back, but I get the same error when I try to remove it  $%Grinno$%

Do you have some idea about what's going on  %confuso ... ??

You are right, I am aware of that technique for making the bridges decks, but at the time I tried it, I wasnt able to obtain a satisfactory result, or better that the result with BAT models  ::)





Regarding the centering issue, what about three sliders, X,Y&Z. They'd move the whole model on the desired direction, so the user can center it "by hand". just a quick suggestion ;)
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: cogeo on April 18, 2009, 05:17:04 AM
Jeronij, send me the model to take a look (my mail address is public). Recognising the transparent state now depends on the setting for the Depth Func. Take a look in the help too.

I don't understand what you mean about centering. What's the difference to the move or shift function?
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: jeronij on April 18, 2009, 05:31:20 AM
Cogeo, the parameters for every mat are set the way they originally were. No changes at all after the first transparency applicattion. I though I could simple remove the existing transparency settings, and then apply the tool again, but it does not seem to work either  ::)

I can send you the file, but it is a big piece, around 1.4MB compressed...
<-- sorry, I missed what you meant with :"Recognising the transparent state now depends on the setting for the Depth Func" .... now I got it, and it worked fine  :thumbsup:

About what I mean about centering, give me some time to try to explain better  ;)
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: cogeo on April 18, 2009, 05:35:20 AM
Quote from: jeronij on April 18, 2009, 05:31:20 AM
I can send you the file, but it is a big piece, around 1.4MB compressed...

No prob  :)
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: jeronij on April 18, 2009, 06:34:28 AM
Finally I got the info about "centering props"  ::) .. thanks to our living wiki, Tage  ;)

http://sc4devotion.com/forums/index.php?topic=4093.0

See specially Tage's post:
http://sc4devotion.com/forums/index.php?topic=4093.msg128642#msg128642

Saying "centering" is perhaps not the most appropriated word  $%Grinno$% ...

Btw, perhaps you dindt see my edit to my previous post  ;)
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: sithlrd98 on April 18, 2009, 10:13:38 AM
Looks like I'm not the only one fascinated by Tages post in that thread..... I have no suggestions on how to implement centering or moving props/models , although in a perfect world, it would be awesome to have said model/prop open on a grid, and manually move the model to the desired location and then have the program do all the math!(Of course , its not a perfect world and your app is still very amazing!)


Jayson
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: buddybud on April 18, 2009, 06:42:09 PM
Quote from: cogeo on April 18, 2009, 03:04:41 AM

@buddybud: I'm considering such operations too. For 20-Z/R models this is not possible though, because of the missing back faces. But it is possible to perform another kind of operation (let's call it "Reorientate"), namely renumbering the instance IDs (for example 0x-----400 would become 0x-----410, 0x-----410 would become 0x-----420 and so on). This way it is possible to effectively "rotate" such a model by multiples of 90°. But for 1-Z/R a full rotation (or flipping, or mirroring is possible). For 90°-multiple rotations using trig functions is not even required, and performing simple coordinates changes is the prefered way (for such rotations the sin and cos functions are always 0, 1, or -1). For example, rotating a model by 90° clockwise means just setting x = y and y = -x. Do you really need rotations that are not 90°-multiples? I can only consider 45° for network models, though I really doubt if diagonal models are just orthogonal models rotated by 45°, some adjustments (esp width) are still needed, I think. Also I'm not sure about textures and triangles, shouldn't just moving the vertices be enough?

cogeo...thanx for the repy, i mentioned network models because unlike bat models they use back faces. When flipping them or rotating them the textures dissappear unless you correctly flip the triangles....for example this... 1 0 4 would become this 4 0 1. etc. This can be done alternatively with altering the uv settings for the model directly instead. As you mentioned this would not apply to bat models. And ya it is all simple process's but it would be great to automate.  ;)  edit i helped and shared this process with BlueLIghteing and he might be able to describe it better then i do but he also employed it.

great tool either way and it has a home in my toolbox :P

Bud
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: RippleJet on April 19, 2009, 05:00:04 AM
Due to RL commitments, I only now found this excellent development, Cogeo! &apls

Regarding centering a model...
if you want to automate it, you only have the vertices of the LOD to go after.

Find the maximum vertices of each view in zoom 5, and determine the size of the model:


X1 (west extension)   =   
-1
× [Maximum X vertex in view 2]
X2 (east extension)   =   
+1
× [Maximum X vertex in view 0]
Z1 (north extension)   =   
-1
× [Maximum X vertex in view 1]
Z2 (south extension)   =   
+1
× [Maximum X vertex in view 3]

The centre point is the average of these extensions.
If the model is centered these should be close to 0:


XC   =   (X1 + X2)/2
ZC   =   (Z1 + Z2)/2


Ideally, if the LOD (at zoom 5) is a custom one, you'd use the maximum X coordinates for the model's zoom 5, but only those vertices having a minimum coordinate value for Y. Normally this would be Y=0, but allowance and tolerance needs to be given for models that have not been rendered at ground level.

Take a look at e.g. SimGoober's Peach Water Tower below:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi232.photobucket.com%2Falbums%2Fee198%2FRippleJet%2FSGPeachWaterTowerModel.jpg&hash=f31fd40fbe6f7150d6e6eb6990e398ace2db48f9)

This is the south (0) view.
Among all vertices having Y=0, the largest X value found is 6.40.
Higher up (betwen 27.4 and 50.4 m above ground) you can find higher X values though.

Provided that the LOD is not a simple box at zoom 5, you'd get buildings having bay windows and other extensions centered correctly this way.

If these values for the model's extension were automatically entered into the XML file as well, you would also get the occupant size set correctly. Based on the occupant size you'd get a smaller footprint in LE (which would allow bay windows to overhang the sidewalk), as well as a correctly sized building foundation (unless a custom foundation has been made).
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: cogeo on April 20, 2009, 03:47:30 PM
@buddybud: I understand that this might be needed for flipping/mirroring the model (as it inverts the drawing order of triangles, effectively making them "backfaces"), but is it needed for rotating models too? I doubt so. And yes, I need a more detailed description, I have never tried editing these ones.

@sithlrd98: Making this isn't simple, it requires implementing another major feature, ie displaying the model. Even if this is finally done, I'm not sure if the library allows selecting the model. Take a look in both the reader's and DatGen's S3D View panes, they are identical aren't they? This is beacuse they both use the same library. And none allows selecting anything in the preview pane. And moving the model manually (dragging?) isn't actaully accurate, ie it would be almost centered, but not "mathematically". This is waht we are actually trying to define here (see also the reply to RippleJet below). Not to mention that the program has a different philosophy, ie select the model(s) and apply an operation in "batch mode" - unlike the reader, which works on a per-object basis. Btw do you think this operation should be allowed to be applied to more than one (selected) models? It's something quite rare, I think, and somewhat risky to my opinion.

@RippleJet: This is basically the algorithm I had proposed above, based on the X and Y (Z in reader) coordinates' min and max values, but only examining the vertices at ground (or lowest) level, ie the base. The problem is that it doesn't cover all cases. As an example, take a look at my last upload, the Rural Rail Stations Pack. The small station (IIDs 0x0004####) has a sort of pavement at the front (all "ground-level" vertices are at Z=0.05, a suggestion by jestarr to eliminate the "jaggies" - but a "clever" algorithm would detect this anyway). As a result, the algorithm would not regard it as "centered", as this causes the model to be not symmetrical. Any object protruding off near the base can cause the algorithm to work not as intented. Don't want to avoid doing it, just trying to find a good solution, which I'm afraid is rather not possible.

Moving the model is really easy to implement. It's basically very similar to scaling the model, as they both operate on the vertices alone. The only differences are the parameters dialog, and the modifications applied. But everyhting else (like applying the operation to the selected models, changing vertex coordinates only etc) is identical. That is the code is largely a copy-and-paste (plus some modifications) of the scaling operation. Consequently, this will be the first to be implemented after V1.00 is released. The other ones are more complicated, not so much actually, but quite different, and thus need more work.
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: sithlrd98 on April 20, 2009, 04:33:15 PM
Quote from: cogeo on April 20, 2009, 03:47:30 PM

@sithlrd98: Making this isn't simple, it requires implementing another major feature, ie displaying the model. Even if this is finally done, I'm not sure if the library allows selecting the model. Take a look in both the reader's and DatGen's S3D View panes, they are identical aren't they? This is beacuse they both use the same library. And none allows selecting anything in the preview pane. And moving the model manually (dragging?) isn't actaully accurate, ie it would be almost centered, but not "mathematically". This is waht we are actually trying to define here (see also the reply to RippleJet below). Not to mention that the program has a different philosophy, ie select the model(s) and apply an operation in "batch mode" - unlike the reader, which works on a per-object basis. Btw do you think this operation should be allowed to be applied to more than one (selected) models? It's something quite rare, I think, and somewhat risky to my opinion.

Quote from: cogeo on April 20, 2009, 03:47:30 PM
Moving the model is really easy to implement. It's basically very similar to scaling the model, as they both operate on the vertices alone. The only differences are the parameters dialog, and the modifications applied. But everyhting else (like applying the operation to the selected models, changing vertex coordinates only etc) is identical. That is the code is largely a copy-and-paste (plus some modifications) of the scaling operation. Consequently, this will be the first to be implemented after V1.00 is released. The other ones are more complicated, not so much actually, but quite different, and thus need more work.

I hope I did not offend you! :) I'm sure that it is very difficult to even create what you already have! If it wasn't , all of us could do it ;D
My question was purely innocent as I was curious , since you were able to "automate" scaling, that "moving" a model would be awesome! I have no real mod skills (or programming skills...last time I did was on a Tandy computer back in the 80's), so anything that can help me is very much appreciated! I can see that it would probably be very taxing  to load up multiple models with many different vertices (correct term?) and , in a way , re-render to a precise location. I have no idea of the ins & outs of these matters , was just curious if it could be implemented. Again thanks for your hard work &apls
I  really meant no disrespect.
Jayson

Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: null45 on April 27, 2009, 08:02:33 PM
Quote from: cogeoTake a look in both the reader's and DatGen's S3D View panes, they are identical aren't they? This is beacuse they both use the same library.

DatGen is a .NET program it's sd3 viewer is a separate implementation independent from the reader's version.

The s3d.dll source code is not included with the reader's source, that makes me wonder who made that dll.  ()what()
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: Diggis on April 28, 2009, 12:51:21 AM
Cogeo,

I've had a quick play with the transparency settings and can confirm what Jeronij found, that when you change the transparency you can no longer edit it.  I'll have a further play and see if that applys to doing anything, or whether it is just the transparency.
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: cogeo on April 28, 2009, 01:10:11 PM
Hi again,

I have just uploaded the version 1.00 Beta of the tool. It should now be working without problems, so please report any of your findings as bugs or omissions. After some few days, and if no probelms are reported, I will release it as an "official" version.

The download link is <Get the official version from the LEX (http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=2072)>


Changes from the previous version:
- The Help file has been updated, all missing topics were added, and there is now help on using the commands and explaining the operations.
- It is now packaged as a standard Windows Installer Package (creates menu links, and uninstall info - run Control Panel -> Add/Remove Programs, or run the installer again and select the Uninstall option).

Some Notes:
- The program doesn't change file associations for any file type (it's not a main modding tool, so this wouldn't be right). However it's quite simple to use, you can use the standard File Open command, or drag-and-drop.
- All information in the registry is stored under "HKEY_CURRENT_USER\Software\Cogeo\SC4 Model Tweaker". The (un)installer deletes this key automatically, while uninstalling.

INSTALLATION
- If you had installed an older version you have to uninstall it fully first (delete all installed files and shortcuts, and then open the registry editor (in your Windows Taskbar select Start->Run, and type-in regedit), go to  "HKEY_CURRENT_USER\Software\Cogeo\" and delete key "SC4 Model Tweaker" (and its subkeys). This step is required before installing the new version, otherwise some menu commands may not be displayed, as the program stores there the "personalisation" options of the old version.
- Otherwise just run the installer.

The help file has been updated, and is now complete. I would like to ask the community, esp the native English speakers to take a deeper look, and report their findings, ie missing topics, broken hyperlinks, even linguistic errors, or instead make suggestions and, why not, even their own contributions. There are some topics not directly accessible from the Contents tab; these are accessible by clicking the Help button on the Toolbar: the cursor then changes to arrow+help, and clicking on any part of the application (menus, windows, toolbar buttons etc) should launch the corresponding help topic. Take as an example the document window: open a model file, and then click on the help button and the document window, this displays help on editing the file. There should be help topics for ALL application items.

I would also like to ask some artist to make a nice icon for this, it currently uses the default MFC icon (supplied by the development tool). Esp needed 48x48, 32z32, 24x24 and 16x16, 8-bit and 4-bit (the last ones are dithered versions of the 8-bit ones - they should normally not be needed, but some user(s) may have choosen such display settings).






Replies to your posts:

@null45: Yes, but apparently both use the GL library, which I doubt if it allows selecting and dragging objects, although this is out of the scope of this tool anyway. The s3d.dll is indeed not included in the reader's source; I just use it (there is a header file and an import library included with the reader's source). Unfortunately there is no documentation, so I had to figure out how it works by looking at the reader's sources.

@Diggis: Jeronij didn't say exactly that. Anyways, you can look at the help, this describes how it works in detail - if it doesn't work as specified, then there's a bug or something.
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: sithlrd98 on April 28, 2009, 06:25:33 PM
Unfortunately ,it still doesn't work on x64Vista :(
I'll have ago at it under x64XP later.

Just ran through the help file , and the only thing I noticed was this:

QuoteWindow Arrange Icons Command

Use this command to arrange the icons for minimized windows at the bottom of the main window. If there is an open document window at the bottom of the main window, then some or all of the icons may not be visible because they will be underneath this d ocument window.

All links worked and , although I skimmed it , nothing else seemed odd.

Jayson
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: cogeo on April 29, 2009, 11:42:02 AM
Jayson, thanks for testing!

What exactly do you mean, the extra space in "d ocument" or what it says?

These "standard" commands are actually ready-made, so I didn't really check them at such level of detail. Ie commands like File Open, or Exit, incl their associated help topics are already implemented by the development environment, and as such they are not expected to contain errors, but sometimes... I'm going to fix this in the release version.

Thanks again
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: sithlrd98 on April 29, 2009, 02:59:11 PM
What I was saying was there was a space between d & ocument...very simple , just noticed!
I still haven't logged over to the xp install yet , but I'll let you know if I have any problems.

Jayson
Title: SC4 Model Tweaker Version 1.00 released
Post by: cogeo on May 10, 2009, 03:39:03 AM
Hi all,

Version 1.00 of SC4 Model Tweaker is now released on the LEX (http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=2072).

I would like to thank all members who have provided testing, feedback and recommendations.


There are some few changes in respect to the Beta:
- Warning message removed.
- All help topics completed.
- Changed application icon.
- Operations are now accessible through a context menu too (right-click).

You can now access operations in four ways:
- Context Menu (right-click on the selected items)
- Application menu
- Toolbar
- Shortcut Keys

The User Interface is customizable to your liking. In the View menu select "Application Look" and pick the desired theme.

There are also many more customization options. Right-click on the toolbar and select "Customize...".

It is recommended that you set the Text Labels on. In the "Toolbars" tab check the "Show text labels" check-box.

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg139.imageshack.us%2Fimg139%2F638%2Fsc4mdtlbls.jpg&hash=2b8c8924b8ea9d39b0a41192665612bd8b7d1548)

Also the feature of hiding the least used menu commands can be turned off. Currently the menus are really short, and hiding some commands not only is of little benefit if at all, it may be frustrating too. In the "Options" tab uncheck the "Menus show recently used commands first" check-box.

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg139.imageshack.us%2Fimg139%2F8098%2Fsc4mdtmnus.jpg&hash=62aac9e3a7017112b54062f3d2f37a0392eddcec)

Or customize the tool to your liking.


More features are about to be implemented soon. Please post requests or recommendations in this thread. In the case of requests for new features, please provide a detailed description. It would also be great to provide the associated help topic too (check the help file to see how they look like).

Enjoy!
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: jeronij on May 10, 2009, 09:30:08 AM
Excellent news ¡¡¡ Thanks for sharing this wonderul tool  :thumbsup:
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: cogeo on May 10, 2009, 12:56:33 PM
I would also like to announce that the Move Model command is already done. Tested it, and it works. It was quite easy to implement, as it is very similar to the Scale Model command (operating only on the vertices), so the whole work was basically a copy-and-paste thing (plus some changes); Making the parameters dialog box was most of the work.

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg362.imageshack.us%2Fimg362%2F5600%2Fsc4mdtmove.jpg&hash=1c65830fce6ecdee1100b35286720538cd215507)

I'm going to upload an evaluation version by the middle of the upcoming week. It will contain the rotate command too (operating on 1-Z/R models only), as it is very similar (operating on vertices only) as well. Models with 20 Z/R views can't be rotated because they lack the "back" faces. But for such models it is possible to make a different command, working by renumbering the view aspects (effectively "rotating" it by multiples of 90°). For example, to "rotate" such a model by 90° it is enough to renumber all 0x------0- S3D files to 0x------1-, the 0x------1- ones to 0x------2-, the 0x------2- ones to 0x------3- and the 0x------3- ones to 0x------0-. This feature might not look very much useful, but it is, I have used it to make prop families of models with a different orientation. But it is possible to do this in the reader too, without very much effort actually, so I don't  know if it's really worth.

Another point that needs to be addressed is operation under Vista. Unfortunately I don't have a Vista installation, but it might be possible to send sevaral test versions to someone who does, and solve this problem too.

Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: sithlrd98 on May 10, 2009, 01:09:08 PM
Quote from: cogeo on May 10, 2009, 12:56:33 PM
Models with 20 Z/R views can't be rotated because they lack the "back" faces. But for such models it is possible to make a different command, working by renumbering the view aspects (effectively "rotating" it by multiples of 90°). For example, to "rotate" such a model by 90° it is enough to renumber all 0x------0- S3D files to 0x------1-, the 0x------1- ones to 0x------2-, the 0x------2- ones to 0x------3- and the 0x------3- ones to 0x------0-. This feature might not look very much useful, but it is, I have used it to make prop families of models with a different orientation. But it is possible to do this in the reader too, without very much effort actually, so I don't  know if it's really worth.

Although I have no idea what that last part means...since I am running x64Vista and hate switching over to my x64XP for one tool . I have no programming experience but I would love to try and help with anything that I can.

Jayson
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: dedgren on May 10, 2009, 01:49:42 PM
cogeo- I still owe you that PM...

I would be happy to be the 64-bit Vista tester.  I have a reasonably powerful HP laptop with dual Intel processors, so that end of the Vista world is covered.  I also have a 32-bit XP Pro machine set up now, so I can do side-by-side comparisons of what works and what doesn't.

Let me know.


David
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: allan_kuan1992 on May 10, 2009, 06:38:59 PM
Interesting... I'll be keeping my eye on this... =)

- Allan Kuan
Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: Orange_o_ on May 11, 2009, 04:09:05 AM
Hello Cogeo, I have just downloaded your software.

It like me very well  &apls,

only I think that he could have of the other one integrated functions:

- The possibility of moving 4 view (centring the building for example) oups
- The possibility of deforming the building (Ripplejet use several methods for the CAM here (http://sc4devotion.com/forums/index.php?topic=6195.0)

It's all for the moment  ;)


Orange

Title: Re: New Custom Content Tool - SC4 Model Tweaker
Post by: choco on May 11, 2009, 05:11:50 AM
nice!  that "move model" cammand would have been great last week... :D

excellent tool cogeo!  :thumbsup:
Title: SC4 Model Tweaker Development/Support thread
Post by: cogeo on May 11, 2009, 09:50:16 AM
@jeronij: Thanks for the nice comments!

@sithlrd98, @dedgren: I will send you test versions if you want to help.

@Orange_o_: The "Move Model" operation is already implemented , although not released yet. It has a variety of uses, among others making overhanging models. As for the "centering", you can specify reverse offsets in moving, so that it's centered. I doubt if this can be done automatically (see the discussion in the previous posts). The problem is that it's not easy to make an algorithm that determines the off-center amount (the rest is the same as the move command, only the parameters wouldn't be entered by the user, instead calculated as described above). As for deforming a model (de-squashing etc) this is really easy, just the scale command has to be modified a little, to work on the Z-axis only.

@choco: Thanks! Well, maybe you can use other (upcoming) features, like merging models etc.
Title: SC4 Model Tweaker Development/Support thread
Post by: dedgren on May 11, 2009, 10:34:36 AM
I'll be watching my email inbox.  Jayson, once you start looking at this, let me know- we can chat about what we find.


David
Title: SC4 Model Tweaker Development/Support thread
Post by: sithlrd98 on May 11, 2009, 10:55:45 AM
No prob! :thumbsup: Looking forward to it in my inbox as well!

Jayson
Title: SC4 Model Tweaker Development/Support thread
Post by: sdc16064 on May 12, 2009, 02:26:32 PM
Does this not work with Vista, because whenever I try to scale the SC4Model, the Tweaker crashes.
Title: SC4 Model Tweaker Development/Support thread
Post by: dedgren on May 12, 2009, 02:28:37 PM
We're working on the Vista issue.  Patience, patience...


David
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: null45 on May 12, 2009, 08:03:12 PM
It also does not work under the Windows 7 RC  ::)

I have a crash dump, but could not analyze it very well without the debugging symbols.
It says HEAP_CORRUPTION_c0000005
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on May 13, 2009, 01:33:51 PM
Hi again,

I have just uploaded a new test version (V1.50 - TEST) of the tool.

The download link is: <Link Removed - Find a more recent link in later posts in this thread>

New features:
- Move model operation
- Rotate model operation (1-Z/R models only)
- Flip/Mirror model operation (1-Z/R models only)

Notes:
- Unlike in the reader, the X, Y and Z axes have their "normal" meaning (Z refers to the height). What is causing all the confusion is just a naming inconsistency in the S3D.DLL's interface, which was propagated even to the reader's user interface.
- The Rotate and Flip/Mirror operations work only for models with one Zoom/Rotation (not for the 20-Z/R, ie those generated by BAT exporting), for the reasons discussed earlier in this therad. I have also tried rotating BAT models (eg for making diagonal versions), but the results were poor. While for certain models (with simple, orthogonal LODs) and angles the lack of back faces might not be a problem, there are problems with the textures (stretched) and protruding objects (badly deformed). So I'm not sure if providing this operation (even with the aforementioned limitations) is really good (though as far as the programming effort is concerned, it's really trivial).
- The Flip/Mirror opeation reverses the Index (triangles) too (swaps the 1st and 3rd vertex refs); otherwise the model/material isn't visible ingame (though it is visible in the reader). The program does not do this in the "invert" case (mirroring with respect to the XY plane), as the order of drawing doesn't change. Btw I'm not sure if this specific opearation is really needed, it might be preferable to remove it. I have not experimented a lot with flipping/mirroring, so I'm not sure if reversing the triangles is always needed; it is definitely needed for flat models (horizontal planes) but I'm not sure about the rest (vertical, inclined or more complex ones). It might be needed for all cases, or may be needed for some cases. I could change the operation, and make this optional or conditional - in the last case some more experienced modders should describe the conditions in detail ("specify" them exactly, ie as an "algorithm").
- There is no documentation (help) for the new features yet, but you should be able to figure them out easily.

INSTALLATION
- Download and install version 1.00 from the LEX (http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=2072), if you haven't already.
- Go to the installation folder and copy the executable somewhere else (outside the installation folder). This way it will be much easier to revert to V1.00 later.
- Get the (new) executable from the download link and overwrite the original (in the installation folder).
- Run the program.
- All commands should appear in the toolbar and display tips, and all menu items (in both the main and the popup menus) should display the keyboard shortcuts.

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg80.imageshack.us%2Fimg80%2F1542%2Fsc4mdtv150.jpg&hash=a4d9c1d4fa6e1d1b1de4991baa0fc51d9a2019a6)

If this is not the case, try using the "Reset", "Reset All" or "Reset my usage data" commands in the "Customize" dialog (right-click on the toolbar to open this dialog). Close and restart the application. If it still doesn't work, try uninstalling and re-installing V1.00, and then overwrite it with the new version, without running the program (V1.00), so that it won't write anything in the registry. Note: uninstalling the application removes everything in the installation folder and the registry, ie it leaves off no "garbage".

Features to be implemented soon (in this week):
- Enhancing the "Scale" operation, so that it is applied to each of the three axes separately (useful for "de-squashing").
- The "Reorient" operation for 20-Z/R models ("rotation" by multiples of 90°, by renumbering the models' instance IDs - see the description in my previous post).

So, stay tuned!

Happy Testing!
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Jonathan on May 13, 2009, 01:38:37 PM
Thanks for this great tool Cogeo!

The latest new feature will be a great help thanks  :thumbsup:

Jonathan
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: sithlrd98 on May 13, 2009, 03:31:11 PM
I didn't think of doing this before and , am not sure if this will help de-bug anything , but going into Event Viewer , I decided to try and give you a little info on what is going on behind the scenes:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi180.photobucket.com%2Falbums%2Fx262%2Fsithlrd98%2Ferror-2.jpg&hash=c0b4ed908600d5ff31e57999723388f15fe0c545)

This is with 1.0.0.1
Log Name:      Application
Source:        Application Error
Date:          5/11/2009 6:06:10 PM
Event ID:      1000
Task Category: (100)
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      Jayson-Vista
Description:
Faulting application SC4MDT.exe, version 1.0.0.1, time stamp 0x4a069b8a, faulting module ntdll.dll, version 6.0.6001.18000, time stamp 0x4791a783, exception code 0xc0000005, fault offset 0x00060043, process id 0x7f8, application start time 0x01c9d28486db03a6.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Application Error" />
    <EventID Qualifiers="0">1000</EventID>
    <Level>2</Level>
    <Task>100</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2009-05-11T22:06:10.000Z" />
    <EventRecordID>1966</EventRecordID>
    <Channel>Application</Channel>
    <Computer>Jayson-Vista</Computer>
    <Security />
  </System>
  <EventData>
    <Data>SC4MDT.exe</Data>
    <Data>1.0.0.1</Data>
    <Data>4a069b8a</Data>
    <Data>ntdll.dll</Data>
    <Data>6.0.6001.18000</Data>
    <Data>4791a783</Data>
    <Data>c0000005</Data>
    <Data>00060043</Data>
    <Data>7f8</Data>
    <Data>01c9d28486db03a6</Data>
  </EventData>
</Event>

And this is with 1.5

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi180.photobucket.com%2Falbums%2Fx262%2Fsithlrd98%2Ferror-1.jpg&hash=a5562184daf9bfbee39782378612d06585c2448c)

Log Name:      Application
Source:        Application Error
Date:          5/13/2009 6:17:51 PM
Event ID:      1000
Task Category: (100)
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      Jayson-Vista
Description:
Faulting application SC4MDT.exe, version 1.5.0.0, time stamp 0x4a0b09d3, faulting module ntdll.dll, version 6.0.6001.18000, time stamp 0x4791a783, exception code 0xc0000005, fault offset 0x00060043, process id 0x1114, application start time 0x01c9d417f13af55b.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Application Error" />
    <EventID Qualifiers="0">1000</EventID>
    <Level>2</Level>
    <Task>100</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2009-05-13T22:17:51.000Z" />
    <EventRecordID>2020</EventRecordID>
    <Channel>Application</Channel>
    <Computer>Jayson-Vista</Computer>
    <Security />
  </System>
  <EventData>
    <Data>SC4MDT.exe</Data>
    <Data>1.5.0.0</Data>
    <Data>4a0b09d3</Data>
    <Data>ntdll.dll</Data>
    <Data>6.0.6001.18000</Data>
    <Data>4791a783</Data>
    <Data>c0000005</Data>
    <Data>00060043</Data>
    <Data>1114</Data>
    <Data>01c9d417f13af55b</Data>
  </EventData>
</Event>

Of course I have no idea what this means , but I'm trying ;)

Jayson
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: sithlrd98 on May 17, 2009, 01:25:33 PM
Sorry to double , but it has been a few days...
Although I couldn't use the tool correctly on Vista, I did switch over to my x64XP install finally , and must say Bravo! The move model aspect works great! Of course I still have a lot to learn with the exact placement values , but it is a lot easier to see the progress while only having to change the values on 1 S3D !
I haven't gotten fancy with the other parts yet but I just want to say a big thank you! &apls

Jayson
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on May 18, 2009, 01:22:12 PM
Jayson, thanks for the nice comments!

I have jus sent you and David a version with debug info. Maybe will be able to tell what's wrong when running under Vista.

As for the rest (the features), I have not yet got any feedback (apart from the comment above, that the move command works). EIther it's all that perfect, or the people who downloaded it (9 so far), haven't tested it yet.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: null45 on May 18, 2009, 03:12:44 PM
I have been testing it on win 7, i assume it is the same problem as vista.
The info I have gotten so far is:

ExceptionAddress: 77754352 (ntdll!RtlpCoalesceFreeBlocks+0x00000496)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 00000000
   Parameter[1]: 04ad20c0
Attempt to read from address 04ad20c0
BUGCHECK_STR:  APPLICATION_FAULT_ACTIONABLE_HEAP_CORRUPTION_heap_failure_entry_corruption_INVALID_POINTER_READ
PRIMARY_PROBLEM_CLASS:  ACTIONABLE_HEAP_CORRUPTION_heap_failure_entry_corruption
DEFAULT_BUCKET_ID:  ACTIONABLE_HEAP_CORRUPTION_heap_failure_entry_corruption


And a Stack trace:

STACK_TEXT: 
001cf2a0 77754623 00510000 04ad20c0 001cf368 ntdll!RtlpCoalesceFreeBlocks+0x496
001cf398 7775494b 04a57248 04a57250 04a57250 ntdll!RtlpFreeHeap+0x1f4
001cf3b8 76e3f10c 00510000 00000000 04a57250 ntdll!RtlFreeHeap+0x142
001cf3cc 00ce517c 00510000 00000000 04a57250 kernel32!HeapFree+0x14
WARNING: Stack unwind information not available. Following frames may be wrong.
001cf40c 00bd265b 04a57250 00890fb8 04a57250 SC4MDT+0x11517c
001cf430 00bd2916 000001b6 00000001 00000120 SC4MDT+0x265b
001cf4d8 00bd4c42 008b0d40 00000002 00000001 SC4MDT+0x2916
001cf510 00be08c5 00be08fe 00000000 00120524 SC4MDT+0x4c42
001cf514 00be08fe 00000000 00120524 00001032 SC4MDT+0x108c5
001cf534 768fc6c2 00120524 00001032 00000000 SC4MDT+0x108fe
001cf618 768f5645 00f5de70 00f06ba0 00000000 user32!gapfnScSendMessage+0x1fa
001cf650 00be2d6f 00d3b288 0086bcd8 001cf690 user32!SendMessageW+0x49
001cf660 00be2f7e 0086bcd8 00008008 00000000 SC4MDT+0x12d6f
001cf690 00bea091 00008008 00000000 00000000 SC4MDT+0x12f7e
001cf6d0 00bda576 00008008 00000000 00000000 SC4MDT+0x1a091
001cf710 00be122c 00008008 00000000 00000000 SC4MDT+0xa576
001cf760 00bda13b 00000000 00000000 0051df00 SC4MDT+0x1122c
001cf77c 00be1ba3 00008008 00000000 7530ce92 SC4MDT+0xa13b
001cf818 00bdd8df 00000111 00008008 00000000 SC4MDT+0x11ba3
001cf838 00be086f 00000111 00008008 00000000 SC4MDT+0xd8df
001cf8a0 00be3956 00000000 000603c6 00000111 SC4MDT+0x1086f
001cf8c8 00bee9c8 00008008 00000000 00847e20 SC4MDT+0x13956
001cf8e0 00be1ba3 00008008 00000000 7530cff6 SC4MDT+0x1e9c8
001cf97c 00bdd8df 00000111 00008008 00000000 SC4MDT+0x11ba3
001cf99c 00be086f 00000111 00008008 00000000 SC4MDT+0xd8df
001cfa04 00be08fe 00000000 001001fe 00000111 SC4MDT+0x1086f
001cfa24 768fc6c2 001001fe 00000111 00008008 SC4MDT+0x108fe
001cfa50 768fc79a 00be08c8 001001fe 00000111 user32!gapfnScSendMessage+0x1fa
001cfac8 768f53ec 002acab4 00be08c8 001001fe user32!gapfnScSendMessage+0x2d2
001cfb08 768f5645 00f3f9d0 00f3dd48 00008008 user32!DefWindowProcW+0x1e8
001cfb28 00bf65fe 001001fe 00000111 00008008 user32!SendMessageW+0x49
001cfb68 00be1f16 00008008 000000aa 0000000d SC4MDT+0x265fe
001cfc08 00bdd8df 00000202 00000000 00d14278 SC4MDT+0x11f16
001cfc28 00c703df 00000202 00000000 000d00aa SC4MDT+0xd8df
001cfc48 00be086f 00000202 00000000 000d00aa SC4MDT+0xa03df
001cfcb0 00be08fe 00000000 0010027e 00000202 SC4MDT+0x1086f
001cfcd0 768fc6c2 0010027e 00000202 00000000 SC4MDT+0x108fe
001cfcfc 768fc79a 00be08c8 0010027e 00000202 user32!gapfnScSendMessage+0x1fa
001cfd74 768fcdc9 002acab4 00be08c8 0010027e user32!gapfnScSendMessage+0x2d2
001cfdd4 768fce9d 00be08c8 00000000 001cfe08 user32!gapfnScSendMessage+0x901
001cfde4 768f4fd6 002ab608 002ab608 0084b4a4 user32!DispatchMessageW+0xf
001cfe08 00be4776 0010027e 00f55cf8 00000000 user32!IsDialogMessageW+0xe7
001cfe1c 00bdde48 002ab608 001cfe3c 00c7045e SC4MDT+0x14776
001cfe28 00c7045e 002ab608 0084b4a4 002ab608 SC4MDT+0xde48
001cfe3c 00bfa76a 002ab608 002ab608 0010027e SC4MDT+0xa045e
001cfe50 00bdfe7a 002ab608 002ab608 00847e20 SC4MDT+0x2a76a
001cfe64 00c3f16e 001001fe 002ab608 002ab5d8 SC4MDT+0xfe7a
001cfe7c 00c3f2c9 002ab608 001cfe94 00c3f1b9 SC4MDT+0x6f16e
001cfe88 00c3f1b9 002ab608 001cfec4 00c3f316 SC4MDT+0x6f2c9
001cfe94 00c3f316 002ab608 00000000 00d67290 SC4MDT+0x6f1b9
001cfec4 00cfe47b fffffffe 00000000 00000001 SC4MDT+0x6f316
001cfed8 00ce4ada 00bd0000 00000000 002716a6 SC4MDT+0x12e47b
001cff68 76e410dc 7ffdb000 001cffb4 77761e9e SC4MDT+0x114ada
001cff74 77761e9e 7ffdb000 77100135 00000000 kernel32!BaseThreadInitThunk+0xe
001cffb4 77761e71 00ce4b45 7ffdb000 00000000 ntdll!__RtlUserThreadStart+0x70
001cffcc 00000000 00ce4b45 7ffdb000 00000000 ntdll!_RtlUserThreadStart+0x1b


hope it helps  :)
 
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: sithlrd98 on May 18, 2009, 03:15:12 PM
Null , I am wondering how you are able to check deeper into the errors? Is it a setting in Vista/Win7 or a third party app?

Jayson
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: sdc16064 on May 18, 2009, 03:39:33 PM
Can you do regular Maxis Buildings? If yes, how?
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: null45 on May 18, 2009, 04:01:56 PM
I use the Debugging Tools for Windows (http://www.microsoft.com/whdc/DevTools/Debugging/default.mspx), a set of tools Microsoft created to allow users to debug crashes.

It allows me to run SC4MDT and when it throws the error the debugger will capture it.
My debugging was limited by the fact that I didn't have the debug info for SC4MDT, without that info I am not able to see where in SC4MDT it crashes.

The download depends on if you are using a 32 bit OS or a 64 bit OS, if you have a 64-bit OS you will have to choose between Native Itanium and
Native x64.
You would know if you had a Itanium.

The data I posted was a crash dump on it's way to Redmond  ;)
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: sithlrd98 on May 18, 2009, 04:09:15 PM
Cool! Since I'm not a developer , I didn't know how easy it was to get that! It definitely supplied more info (at least it looks like it did) compared to the Vista dump!

Jayson
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: null45 on May 18, 2009, 06:09:25 PM
The debugger WinDbg has to be run as an Administrator on Vista.

The steps I ust to get the debugger to capture data are
1. start SC4MDT and load a model with a S3D then start WinDbg
2. press F6 (or File->Attach to a process) in WinDbg to load the Attach to a process Dialog and select SC4MDT from the list
3. press F5 (or Debug->Go) in WinDbg to tell it to continue then try to scale a model in SC4MDT
WinDbg should say something like Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=00006f72 ebx=04a57358 ecx=00000001 edx=000007ff esi=04a8eee8 edi=00580000
eip=777c4352 esp=0015f038 ebp=0015f060 iopl=0         nv up ei pl nz na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010206
ntdll!RtlpCoalesceFreeBlocks+0x496:
777c4352 8b06            mov     eax,dword ptr [esi]  ds:0023:04a8eee8=????????


4. type !analyze -v at the command line,it should now say *******************************************************************************
*                                                                             *
*                        Exception Analysis                                   *
*                                                                             *
*******************************************************************************
with a lot of text after it
Maybe it may reveal more info when run on a copy with the debugging symbols
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: sithlrd98 on May 18, 2009, 06:12:35 PM
You must have ESP cause I've been messing with this and all I could do was create a mini dump! Going to try again!




Microsoft (R) Windows Debugger Version 6.11.0001.404 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.

*** wait with pending attach
Symbol search path is: *** Invalid ***
****************************************************************************
* Symbol loading may be unreliable without a symbol search path.           *
* Use .symfix to have the debugger choose a symbol path.                   *
* After setting your symbol path, use .reload to refresh symbol locations. *
****************************************************************************
Executable search path is:
ModLoad: 00000000`003b0000 00000000`006b6000   C:\Program Files (x86)\Cogeo\SC4 Model Tweaker\SC4MDT.exe
ModLoad: 00000000`77c40000 00000000`77dc0000   C:\Windows\system32\ntdll.dll
ModLoad: 00000000`77de0000 00000000`77f40000   ntdll.dll
ModLoad: 00000000`75ef0000 00000000`75f35000   C:\Windows\system32\wow64.dll
ModLoad: 00000000`75d00000 00000000`75d4e000   C:\Windows\system32\wow64win.dll
ModLoad: 00000000`75ee0000 00000000`75ee9000   C:\Windows\system32\wow64cpu.dll
ModLoad: 00000000`77260000 00000000`77370000   KERNEL32.dll
ModLoad: 00000000`10000000 00000000`10025000   s3d.dll
ModLoad: 00000000`71c50000 00000000`71d6b000   MFC42.dll
ModLoad: 00000000`776f0000 00000000`7779a000   msvcrt.dll
ModLoad: 00000000`777a0000 00000000`77870000   USER32.dll
ModLoad: 00000000`76e90000 00000000`76f20000   GDI32.dll
ModLoad: 00000000`774c0000 00000000`77586000   ADVAPI32.dll
ModLoad: 00000000`770f0000 00000000`771e0000   RPCRT4.dll
ModLoad: 00000000`75f90000 00000000`75ff0000   Secur32.dll
ModLoad: 00000000`775a0000 00000000`776e4000   ole32.dll
ModLoad: 00000000`760a0000 00000000`7612d000   OLEAUT32.dll
ModLoad: 00000000`76f20000 00000000`76ff0000   WININET.dll
ModLoad: 00000000`75ff0000 00000000`76048000   SHLWAPI.dll
ModLoad: 00000000`770a0000 00000000`770a3000   Normaliz.dll
ModLoad: 00000000`76050000 00000000`76095000   iertutil.dll
ModLoad: 00000000`77870000 00000000`7789d000   WS2_32.dll
ModLoad: 00000000`77a30000 00000000`77a36000   NSI.dll
ModLoad: 00000000`73560000 00000000`735c5000   ODBC32.dll
ModLoad: 00000000`757b0000 00000000`7594e000   COMCTL32.dll
ModLoad: 00000000`761c0000 00000000`76cd0000   SHELL32.dll
ModLoad: 00000000`77370000 00000000`773e3000   COMDLG32.dll
ModLoad: 00000000`73ba0000 00000000`73ba5000   MSIMG32.dll
ModLoad: 00000000`75620000 00000000`75662000   WINSPOOL.DRV
ModLoad: 00000000`73440000 00000000`7345c000   oledlg.dll
ModLoad: 00000000`73e60000 00000000`7400b000   gdiplus.dll
ModLoad: 00000000`76ff0000 00000000`77050000   IMM32.dll
ModLoad: 00000000`773f0000 00000000`774b8000   MSCTF.dll
ModLoad: 00000000`746a0000 00000000`746d2000   WINMM.dll
ModLoad: 00000000`74660000 00000000`74699000   OLEACC.dll
ModLoad: 00000000`72970000 00000000`7298e000   ShimEng.dll
ModLoad: 00000000`75750000 00000000`7577c000   apphelp.dll
ModLoad: 00000000`71bc0000 00000000`71c48000   NULL.dll
ModLoad: 00000000`753c0000 00000000`753de000   USERENV.dll
ModLoad: 00000000`73630000 00000000`73644000   MPR.dll
ModLoad: 00000000`71780000 00000000`71993000   NULL.dll
ModLoad: 00000000`75530000 00000000`755b0000   UxTheme.dll
ModLoad: 00000000`75a70000 00000000`75ae5000   NETAPI32.dll
ModLoad: 00000000`770b0000 00000000`770b7000   PSAPI.DLL
ModLoad: 00000000`739b0000 00000000`739c4000   MSACM32.dll
ModLoad: 00000000`75cf0000 00000000`75cf8000   VERSION.dll
ModLoad: 00000000`73680000 00000000`73685000   sfc.dll
ModLoad: 00000000`73810000 00000000`7381d000   sfc_os.dll
ModLoad: 00000000`778a0000 00000000`77a2a000   SETUPAPI.dll
ModLoad: 00000000`73cd0000 00000000`73cdc000   dwmapi.dll
ModLoad: 00000000`76d60000 00000000`76e89000   urlmon.dll
ModLoad: 00000000`73bb0000 00000000`73bb5000   SHUNIMPL.dll
ModLoad: 00000000`77590000 00000000`77599000   LPK.dll
ModLoad: 00000000`771e0000 00000000`7725d000   USP10.dll
ModLoad: 00000000`73520000 00000000`73558000   image00000000`73520000
ModLoad: 00000000`75710000 00000000`7574b000   RSAENH.dll
ModLoad: 00000000`75e50000 00000000`75e7f000   WINMMDRV.dll
ModLoad: 00000000`75ed0000 00000000`75ed4000   ksuser.dll
ModLoad: 00000000`72e40000 00000000`72e67000   MMDevAPI.DLL
ModLoad: 00000000`72e00000 00000000`72e07000   AVRT.dll
ModLoad: 00000000`72e70000 00000000`72e9d000   WINTRUST.dll
ModLoad: 00000000`74090000 00000000`74181000   CRYPT32.dll
ModLoad: 00000000`745f0000 00000000`74602000   MSASN1.dll
ModLoad: 00000000`770c0000 00000000`770e9000   imagehlp.dll
ModLoad: 00000000`72e10000 00000000`72e31000   AudioSes.DLL
ModLoad: 00000000`72ac0000 00000000`72b26000   audioeng.dll
ModLoad: 00000000`75ea0000 00000000`75ea9000   MSACM32.DRV
ModLoad: 00000000`75e40000 00000000`75e47000   MIDIMAP.dll
ModLoad: 00000000`76130000 00000000`761b4000   CLBCatQ.DLL
ModLoad: 00000000`71d70000 00000000`71eb6000   BROWSEUI.dll
ModLoad: 00000000`75470000 00000000`7552b000   PROPSYS.dll
ModLoad: 00000000`72830000 00000000`72860000   DUser.dll
ModLoad: 00000000`728b0000 00000000`72910000   tiptsf.dll
ModLoad: 00000000`73460000 00000000`73513000   WindowsCodecs.dll
ModLoad: 00000000`75a50000 00000000`75a61000   SAMLIB.dll
ModLoad: 00000000`72920000 00000000`7296a000   ntshrui.dll
ModLoad: 00000000`75b30000 00000000`75b3b000   CSCAPI.dll
ModLoad: 00000000`73bc0000 00000000`73bfa000   slc.dll
ModLoad: 00000000`71b80000 00000000`71bbc000   MSSHSQ.dll
ModLoad: 00000000`72890000 00000000`728a6000   thumbcache.dll
ModLoad: 00000000`71ac0000 00000000`71b13000   SWEEPRX.dll
ModLoad: 00000000`73270000 00000000`73377000   SHDOCVW.dll
ModLoad: 00000000`711b0000 00000000`7177e000   IEFRAME.dll
ModLoad: 00000000`75b40000 00000000`75b61000   NTMARTA.dll
ModLoad: 00000000`77050000 00000000`7709a000   WLDAP32.dll
(17a0.f34): Break instruction exception - code 80000003 (first chance)
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\Windows\system32\ntdll.dll -
ntdll!DbgBreakPoint:
00000000`77c84ea0 cc              int     3
0:007> g
(17a0.13b0): Break instruction exception - code 80000003 (first chance)
ntdll!DbgBreakPoint:
00000000`77c84ea0 cc              int     3
0:007> g
(17a0.14f8): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for ntdll.dll -
ntdll_77de0000!RtlFreeHandle+0x9a9:
77e40043 324e02          xor     cl,byte ptr [esi+2]        ds:002b:01028df2=??
0:000:x86> !analyze -v
*******************************************************************************
*                                                                             *
*                        Exception Analysis                                   *
*                                                                             *
*******************************************************************************

*** ERROR: Symbol file could not be found.  Defaulted to export symbols for KERNEL32.dll -
*** ERROR: Module load completed but symbols could not be loaded for C:\Program Files (x86)\Cogeo\SC4 Model Tweaker\SC4MDT.exe
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for USER32.dll -
***** OS symbols are WRONG. Please fix symbols to do analysis.

*************************************************************************
***                                                                   ***
***                                                                   ***
***    Your debugger is not using the correct symbols                 ***
***                                                                   ***
***    In order for this command to work properly, your symbol path   ***
***    must point to .pdb files that have full type information.      ***
***                                                                   ***
***    Certain .pdb files (such as the public OS symbols) do not      ***
***    contain the required information.  Contact the group that      ***
***    provided you with these symbols if you need this command to    ***
***    work.                                                          ***
***                                                                   ***
***    Type referenced: ntdll!_PEB                                    ***
***                                                                   ***
*************************************************************************
*** WARNING: Unable to verify checksum for s3d.dll
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for s3d.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for IEFRAME.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for NULL.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for SWEEPRX.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for MSSHSQ.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for NULL.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for MFC42.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for BROWSEUI.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for DUser.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for thumbcache.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for ntshrui.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for ShimEng.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for audioeng.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for AVRT.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for AudioSes.DLL -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for MMDevAPI.DLL -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for WINTRUST.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for SHDOCVW.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for oledlg.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for WindowsCodecs.dll -
*** ERROR: Module load completed but symbols could not be loaded for image00000000`73520000
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for ODBC32.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for MPR.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for sfc.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for sfc_os.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for MSACM32.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for MSIMG32.dll -
*** ERROR: Module load completed but symbols could not be loaded for SHUNIMPL.dll
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for slc.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for dwmapi.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for gdiplus.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for CRYPT32.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for MSASN1.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for OLEACC.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for WINMM.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for USERENV.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for PROPSYS.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for UxTheme.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for WINSPOOL.DRV -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for RSAENH.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for apphelp.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for COMCTL32.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for SAMLIB.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for NETAPI32.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for CSCAPI.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for NTMARTA.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for VERSION.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\Windows\system32\wow64win.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for MIDIMAP.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for WINMMDRV.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for MSACM32.DRV -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for ksuser.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\Windows\system32\wow64cpu.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\Windows\system32\wow64.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for Secur32.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for SHLWAPI.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for iertutil.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for OLEAUT32.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for CLBCatQ.DLL -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for SHELL32.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for urlmon.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for GDI32.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for WININET.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for IMM32.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for WLDAP32.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for Normaliz.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for PSAPI.DLL -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for imagehlp.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for RPCRT4.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for USP10.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for COMDLG32.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for MSCTF.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for ADVAPI32.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for LPK.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for ole32.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for msvcrt.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for WS2_32.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for SETUPAPI.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for NSI.dll -
*************************************************************************
***                                                                   ***
***                                                                   ***
***    Your debugger is not using the correct symbols                 ***
***                                                                   ***
***    In order for this command to work properly, your symbol path   ***
***    must point to .pdb files that have full type information.      ***
***                                                                   ***
***    Certain .pdb files (such as the public OS symbols) do not      ***
***    contain the required information.  Contact the group that      ***
***    provided you with these symbols if you need this command to    ***
***    work.                                                          ***
***                                                                   ***
***    Type referenced: IMAGE_NT_HEADERS32                            ***
***                                                                   ***
*************************************************************************
*************************************************************************
***                                                                   ***
***                                                                   ***
***    Your debugger is not using the correct symbols                 ***
***                                                                   ***
***    In order for this command to work properly, your symbol path   ***
***    must point to .pdb files that have full type information.      ***
***                                                                   ***
***    Certain .pdb files (such as the public OS symbols) do not      ***
***    contain the required information.  Contact the group that      ***
***    provided you with these symbols if you need this command to    ***
***    work.                                                          ***
***                                                                   ***
***    Type referenced: kernel32!pNlsUserInfo                         ***
***                                                                   ***
*************************************************************************
*************************************************************************
***                                                                   ***
***                                                                   ***
***    Your debugger is not using the correct symbols                 ***
***                                                                   ***
***    In order for this command to work properly, your symbol path   ***
***    must point to .pdb files that have full type information.      ***
***                                                                   ***
***    Certain .pdb files (such as the public OS symbols) do not      ***
***    contain the required information.  Contact the group that      ***
***    provided you with these symbols if you need this command to    ***
***    work.                                                          ***
***                                                                   ***
***    Type referenced: kernel32!pNlsUserInfo                         ***
***                                                                   ***
*************************************************************************

FAULTING_IP:
ntdll_77de0000!RtlFreeHandle+9a9
77e40043 324e02          xor     cl,byte ptr [esi+2]

EXCEPTION_RECORD:  ffffffffffffffff -- (.exr 0xffffffffffffffff)
ExceptionAddress: 0000000077e40043 (ntdll_77de0000!RtlFreeHandle+0x00000000000009a9)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 0000000000000000
   Parameter[1]: 0000000001028df2
Attempt to read from address 0000000001028df2

FAULTING_THREAD:  00000000000014f8

PROCESS_NAME:  SC4MDT.exe

FAULTING_MODULE: 0000000077c40000 ntdll

DEBUG_FLR_IMAGE_TIMESTAMP:  0

ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.

EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.

EXCEPTION_PARAMETER1:  0000000000000000

EXCEPTION_PARAMETER2:  0000000001028df2

READ_ADDRESS:  0000000001028df2

FOLLOWUP_IP:
ntdll_77de0000!RtlFreeHandle+9a9
77e40043 324e02          xor     cl,byte ptr [esi+2]

ADDITIONAL_DEBUG_TEXT: 
Use '!findthebuild' command to search for the target build information.
If the build information is available, run '!findthebuild -s ; .reload' to set symbol path and load symbols. ; Enable Pageheap/AutoVerifer

DEFAULT_BUCKET_ID:  HEAP_CORRUPTION

PRIMARY_PROBLEM_CLASS:  HEAP_CORRUPTION

BUGCHECK_STR:  APPLICATION_FAULT_HEAP_CORRUPTION_INVALID_POINTER_READ_WRONG_SYMBOLS

LAST_CONTROL_TRANSFER:  from 0000000077e0f676 to 0000000077e40043

STACK_TEXT: 
WARNING: Stack unwind information not available. Following frames may be wrong.
0083eadc 77e0f676 02e70000 0109ede0 0083eb84 ntdll_77de0000!RtlFreeHandle+0x9a9
0083ebd4 77e0f285 0109ede0 0109ede8 0109ede8 ntdll_77de0000!RtlTryEnterCriticalSection+0xe0
0083ebf0 772e3621 02e70000 00000000 0109ede0 ntdll_77de0000!RtlDeactivateActivationContextUnsafeFast+0xbbe9
0083ec04 004c585c 02e70000 00000000 0109ede8 KERNEL32!HeapFree+0x14
0083ec44 003b2a44 0109ede8 02d88530 0109ede8 SC4MDT+0x11585c
0083ec6c 003b2e37 02da4eb8 000001a4 00000001 SC4MDT+0x2a44
0083ed18 003b5292 02da4eb8 00000035 00000000 SC4MDT+0x2e37
0083ed64 777b8807 005709ec 00001032 00000000 SC4MDT+0x5292
0083ee4c 777bc517 01488ba0 00000000 003c0fca USER32!GetWindowLongW+0x250
0083ee88 003c3471 0051b770 02d816d0 0083eec8 USER32!SendMessageW+0x4c
0083ee98 003c3680 02d816d0 00008008 00000000 SC4MDT+0x13471
0083eec8 003ca799 00008008 00000000 00000000 SC4MDT+0x13680
0083ef08 003bacd2 00008008 00000000 00000000 SC4MDT+0x1a799
0083ef48 003c192e 00008008 00000000 00000000 SC4MDT+0xacd2
0083ef98 003ba897 00000000 00000000 02d6ee40 SC4MDT+0x1192e
0083efb4 003c22a5 00008008 00000000 2288bfad SC4MDT+0xa897
0083f050 003bdfee 00000111 00008008 00000000 SC4MDT+0x122a5
0083f070 003c0f71 00000111 00008008 00000000 SC4MDT+0xdfee
0083f0d8 003c4074 00000000 0021088e 00000111 SC4MDT+0x10f71
0083f100 003cf110 00008008 00000000 02d5efc8 SC4MDT+0x14074
0083f118 003c22a5 00008008 00000000 2288be49 SC4MDT+0x1f110
0083f1b4 003bdfee 00000111 00008008 00000000 SC4MDT+0x122a5
0083f1d4 003c0f71 00000111 00008008 00000000 SC4MDT+0xdfee
0083f23c 003c1000 00000000 0040064a 00000111 SC4MDT+0x10f71
0083f25c 777b8807 0040064a 00000111 00008008 SC4MDT+0x11000
0083f288 777b8962 003c0fca 0040064a 00000111 USER32!GetWindowLongW+0x250
0083f300 777bc4b6 00999acc 003c0fca 0040064a USER32!GetWindowLongW+0x3ab
0083f344 777bc517 014b8820 00000000 003c0fca USER32!ValidateRgn+0x132
0083f368 003d6dc7 0040064a 00000111 00008008 USER32!SendMessageW+0x4c
0083f3a8 003c2618 00008008 00000099 0000000a SC4MDT+0x26dc7
0083f448 003bdfee 00000202 00000000 004f4288 SC4MDT+0x12618
0083f468 00450b25 00000202 00000000 000a0099 SC4MDT+0xdfee
0083f488 003c0f71 00000202 00000000 000a0099 SC4MDT+0xa0b25
0083f4f0 003c1000 00000000 0054032a 00000202 SC4MDT+0x10f71
0083f510 777b8807 0054032a 00000202 00000000 SC4MDT+0x11000
0083f53c 777b8962 003c0fca 0054032a 00000202 USER32!GetWindowLongW+0x250
0083f5b4 777b8aad 00999acc 003c0fca 0054032a USER32!GetWindowLongW+0x3ab
0083f618 777b8b00 003c0fca 00000000 0083f654 USER32!GetWindowLongW+0x4f6
0083f628 777c7ecc 00999078 00999078 02d6264c USER32!DispatchMessageW+0xf
0083f654 003c4e94 0054032a 00000000 00000000 USER32!IsDialogMessageW+0xff
0083f668 003be557 00999078 0083f688 00450ba4 SC4MDT+0x14e94
0083f674 00450ba4 00999078 02d6264c 00999078 SC4MDT+0xe557
0083f688 003daeac 00999078 00999078 0054032a SC4MDT+0xa0ba4
0083f69c 003c057c 00999078 00999078 02d5efc8 SC4MDT+0x2aeac
0083f6b0 0041f8d1 0040064a 00999078 00999048 SC4MDT+0x1057c
0083f6c8 0041fa2c 00999078 0083f6e0 0041f91c SC4MDT+0x6f8d1
0083f6d4 0041f91c 00999078 0083f710 0041fa79 SC4MDT+0x6fa2c
0083f6e0 0041fa79 00999078 00000000 00547298 SC4MDT+0x6f91c
0083f710 004deb5b fffffffe 00000000 00000001 SC4MDT+0x6fa79
0083f724 004c51b2 003b0000 00000000 00940f22 SC4MDT+0x12eb5b
0083f7b4 772ee4a5 7efde000 0083f800 77e5cfed SC4MDT+0x1151b2
0083f7c0 77e5cfed 7efde000 71593853 00000000 KERNEL32!BaseThreadInitThunk+0xe
0083f800 77e5d1ff 004c521d 7efde000 00000000 ntdll_77de0000!RtlCreateUserProcess+0x8c
0083f818 00000000 004c521d 7efde000 00000000 ntdll_77de0000!RtlCreateProcessParameters+0x4e


SYMBOL_NAME:  heap_corruption!heap_corruption

FOLLOWUP_NAME:  MachineOwner

MODULE_NAME: heap_corruption

IMAGE_NAME:  heap_corruption

STACK_COMMAND:  ~0s ; kb

FAILURE_BUCKET_ID:  HEAP_CORRUPTION_c0000005_heap_corruption!heap_corruption

BUCKET_ID:  X64_APPLICATION_FAULT_HEAP_CORRUPTION_INVALID_POINTER_READ_WRONG_SYMBOLS_heap_corruption!heap_corruption

WATSON_IBUCKET:  1281085321

WATSON_IBUCKETTABLE:  1

WATSON_STAGEONE_URL:  http://watson.microsoft.com/StageOne/SC4MDT_exe/1_5_1_0/4a119e4f/ntdll_dll/6_0_6001_18000/4791a783/c0000005/00060043.htm?Retriage=1

Followup: MachineOwner
---------



Not sure if I did it right....This was generated by me manually making SC4MT actually try to scale since the de-bugger seemed to hang.


Jayson

Title: Re: SC4 Model Tweaker Development/Support thread
Post by: sithlrd98 on May 18, 2009, 06:47:02 PM
Evidently , there were too many characters to add this to previous post  so here are the results of the move option..again manual execution:

Microsoft (R) Windows Debugger Version 6.11.0001.404 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.

*** wait with pending attach
Symbol search path is: *** Invalid ***
****************************************************************************
* Symbol loading may be unreliable without a symbol search path.           *
* Use .symfix to have the debugger choose a symbol path.                   *
* After setting your symbol path, use .reload to refresh symbol locations. *
****************************************************************************
Executable search path is:
ModLoad: 00000000`003b0000 00000000`006b6000   C:\Program Files (x86)\Cogeo\SC4 Model Tweaker\SC4MDT.exe
ModLoad: 00000000`77c40000 00000000`77dc0000   C:\Windows\system32\ntdll.dll
ModLoad: 00000000`77de0000 00000000`77f40000   ntdll.dll
ModLoad: 00000000`75ef0000 00000000`75f35000   C:\Windows\system32\wow64.dll
ModLoad: 00000000`75d00000 00000000`75d4e000   C:\Windows\system32\wow64win.dll
ModLoad: 00000000`75ee0000 00000000`75ee9000   C:\Windows\system32\wow64cpu.dll
ModLoad: 00000000`77260000 00000000`77370000   KERNEL32.dll
ModLoad: 00000000`10000000 00000000`10025000   s3d.dll
ModLoad: 00000000`71a60000 00000000`71b7b000   MFC42.dll
ModLoad: 00000000`776f0000 00000000`7779a000   msvcrt.dll
ModLoad: 00000000`777a0000 00000000`77870000   USER32.dll
ModLoad: 00000000`76e90000 00000000`76f20000   GDI32.dll
ModLoad: 00000000`774c0000 00000000`77586000   ADVAPI32.dll
ModLoad: 00000000`770f0000 00000000`771e0000   RPCRT4.dll
ModLoad: 00000000`75f90000 00000000`75ff0000   Secur32.dll
ModLoad: 00000000`775a0000 00000000`776e4000   ole32.dll
ModLoad: 00000000`760a0000 00000000`7612d000   OLEAUT32.dll
ModLoad: 00000000`76f20000 00000000`76ff0000   WININET.dll
ModLoad: 00000000`75ff0000 00000000`76048000   SHLWAPI.dll
ModLoad: 00000000`770a0000 00000000`770a3000   Normaliz.dll
ModLoad: 00000000`76050000 00000000`76095000   iertutil.dll
ModLoad: 00000000`77870000 00000000`7789d000   WS2_32.dll
ModLoad: 00000000`77a30000 00000000`77a36000   NSI.dll
ModLoad: 00000000`73560000 00000000`735c5000   ODBC32.dll
ModLoad: 00000000`757b0000 00000000`7594e000   COMCTL32.dll
ModLoad: 00000000`761c0000 00000000`76cd0000   SHELL32.dll
ModLoad: 00000000`77370000 00000000`773e3000   COMDLG32.dll
ModLoad: 00000000`73ba0000 00000000`73ba5000   MSIMG32.dll
ModLoad: 00000000`75620000 00000000`75662000   WINSPOOL.DRV
ModLoad: 00000000`73440000 00000000`7345c000   oledlg.dll
ModLoad: 00000000`73e60000 00000000`7400b000   gdiplus.dll
ModLoad: 00000000`76ff0000 00000000`77050000   IMM32.dll
ModLoad: 00000000`773f0000 00000000`774b8000   MSCTF.dll
ModLoad: 00000000`746a0000 00000000`746d2000   WINMM.dll
ModLoad: 00000000`74660000 00000000`74699000   OLEACC.dll
ModLoad: 00000000`728d0000 00000000`728ee000   ShimEng.dll
ModLoad: 00000000`75750000 00000000`7577c000   apphelp.dll
ModLoad: 00000000`71b80000 00000000`71c08000   NULL.dll
ModLoad: 00000000`753c0000 00000000`753de000   USERENV.dll
ModLoad: 00000000`73630000 00000000`73644000   MPR.dll
ModLoad: 00000000`71620000 00000000`71833000   NULL.dll
ModLoad: 00000000`75530000 00000000`755b0000   UxTheme.dll
ModLoad: 00000000`75a70000 00000000`75ae5000   NETAPI32.dll
ModLoad: 00000000`770b0000 00000000`770b7000   PSAPI.DLL
ModLoad: 00000000`739b0000 00000000`739c4000   MSACM32.dll
ModLoad: 00000000`75cf0000 00000000`75cf8000   VERSION.dll
ModLoad: 00000000`73680000 00000000`73685000   sfc.dll
ModLoad: 00000000`73810000 00000000`7381d000   sfc_os.dll
ModLoad: 00000000`778a0000 00000000`77a2a000   SETUPAPI.dll
ModLoad: 00000000`73cd0000 00000000`73cdc000   dwmapi.dll
ModLoad: 00000000`76d60000 00000000`76e89000   urlmon.dll
ModLoad: 00000000`73b80000 00000000`73b85000   SHUNIMPL.dll
ModLoad: 00000000`77590000 00000000`77599000   LPK.dll
ModLoad: 00000000`771e0000 00000000`7725d000   USP10.dll
ModLoad: 00000000`73520000 00000000`73558000   image00000000`73520000
ModLoad: 00000000`75710000 00000000`7574b000   RSAENH.dll
ModLoad: 00000000`75e50000 00000000`75e7f000   WINMMDRV.dll
ModLoad: 00000000`75ed0000 00000000`75ed4000   ksuser.dll
ModLoad: 00000000`72e40000 00000000`72e67000   MMDevAPI.DLL
ModLoad: 00000000`72e00000 00000000`72e07000   AVRT.dll
ModLoad: 00000000`72e70000 00000000`72e9d000   WINTRUST.dll
ModLoad: 00000000`74090000 00000000`74181000   CRYPT32.dll
ModLoad: 00000000`745f0000 00000000`74602000   MSASN1.dll
ModLoad: 00000000`770c0000 00000000`770e9000   imagehlp.dll
ModLoad: 00000000`72e10000 00000000`72e31000   AudioSes.DLL
ModLoad: 00000000`72ac0000 00000000`72b26000   audioeng.dll
ModLoad: 00000000`75ea0000 00000000`75ea9000   MSACM32.DRV
ModLoad: 00000000`75e40000 00000000`75e47000   MIDIMAP.dll
ModLoad: 00000000`76130000 00000000`761b4000   CLBCatQ.DLL
ModLoad: 00000000`71d70000 00000000`71eb6000   BROWSEUI.dll
ModLoad: 00000000`75470000 00000000`7552b000   PROPSYS.dll
ModLoad: 00000000`72830000 00000000`72860000   DUser.dll
ModLoad: 00000000`71c40000 00000000`71ca0000   tiptsf.dll
ModLoad: 00000000`73460000 00000000`73513000   WindowsCodecs.dll
ModLoad: 00000000`75a50000 00000000`75a61000   SAMLIB.dll
ModLoad: 00000000`72880000 00000000`728ca000   ntshrui.dll
ModLoad: 00000000`75b30000 00000000`75b3b000   CSCAPI.dll
ModLoad: 00000000`73bc0000 00000000`73bfa000   slc.dll
ModLoad: 00000000`719e0000 00000000`71a1c000   MSSHSQ.dll
ModLoad: 00000000`72860000 00000000`72876000   thumbcache.dll
ModLoad: 00000000`71920000 00000000`71973000   SWEEPRX.dll
ModLoad: 00000000`73270000 00000000`73377000   SHDOCVW.dll
ModLoad: 00000000`70190000 00000000`7075e000   IEFRAME.dll
ModLoad: 00000000`75b40000 00000000`75b61000   NTMARTA.dll
ModLoad: 00000000`77050000 00000000`7709a000   WLDAP32.dll
(16b0.17a0): Break instruction exception - code 80000003 (first chance)
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\Windows\system32\ntdll.dll -
ntdll!DbgBreakPoint:
00000000`77c84ea0 cc              int     3
0:007> g
(16b0.d70): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for ntdll.dll -
ntdll_77de0000!RtlFreeHandle+0xbcd:
77e40267 8b4904          mov     ecx,dword ptr [ecx+4] ds:002b:00000004=????????
0:000:x86> !analyze -v
*******************************************************************************
*                                                                             *
*                        Exception Analysis                                   *
*                                                                             *
*******************************************************************************

*** ERROR: Symbol file could not be found.  Defaulted to export symbols for KERNEL32.dll -
*** ERROR: Module load completed but symbols could not be loaded for C:\Program Files (x86)\Cogeo\SC4 Model Tweaker\SC4MDT.exe
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for USER32.dll -
***** OS symbols are WRONG. Please fix symbols to do analysis.

*************************************************************************
***                                                                   ***
***                                                                   ***
***    Your debugger is not using the correct symbols                 ***
***                                                                   ***
***    In order for this command to work properly, your symbol path   ***
***    must point to .pdb files that have full type information.      ***
***                                                                   ***
***    Certain .pdb files (such as the public OS symbols) do not      ***
***    contain the required information.  Contact the group that      ***
***    provided you with these symbols if you need this command to    ***
***    work.                                                          ***
***                                                                   ***
***    Type referenced: ntdll!_PEB                                    ***
***                                                                   ***
*************************************************************************
*** WARNING: Unable to verify checksum for s3d.dll
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for s3d.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for IEFRAME.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for NULL.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for SWEEPRX.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for MSSHSQ.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for MFC42.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for NULL.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for tiptsf.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for BROWSEUI.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for DUser.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for thumbcache.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for ntshrui.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for ShimEng.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for audioeng.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for AVRT.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for AudioSes.DLL -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for MMDevAPI.DLL -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for WINTRUST.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for SHDOCVW.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for oledlg.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for WindowsCodecs.dll -
*** ERROR: Module load completed but symbols could not be loaded for image00000000`73520000
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for ODBC32.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for MPR.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for sfc.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for sfc_os.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for MSACM32.dll -
*** ERROR: Module load completed but symbols could not be loaded for SHUNIMPL.dll
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for MSIMG32.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for slc.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for dwmapi.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for gdiplus.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for CRYPT32.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for MSASN1.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for OLEACC.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for WINMM.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for USERENV.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for PROPSYS.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for UxTheme.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for WINSPOOL.DRV -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for RSAENH.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for apphelp.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for COMCTL32.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for SAMLIB.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for NETAPI32.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for CSCAPI.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for NTMARTA.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for VERSION.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\Windows\system32\wow64win.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for MIDIMAP.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for WINMMDRV.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for MSACM32.DRV -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for ksuser.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\Windows\system32\wow64cpu.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\Windows\system32\wow64.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for Secur32.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for SHLWAPI.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for iertutil.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for OLEAUT32.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for CLBCatQ.DLL -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for SHELL32.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for urlmon.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for GDI32.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for WININET.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for IMM32.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for WLDAP32.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for Normaliz.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for PSAPI.DLL -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for imagehlp.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for RPCRT4.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for USP10.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for COMDLG32.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for MSCTF.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for ADVAPI32.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for LPK.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for ole32.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for msvcrt.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for WS2_32.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for SETUPAPI.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for NSI.dll -
*************************************************************************
***                                                                   ***
***                                                                   ***
***    Your debugger is not using the correct symbols                 ***
***                                                                   ***
***    In order for this command to work properly, your symbol path   ***
***    must point to .pdb files that have full type information.      ***
***                                                                   ***
***    Certain .pdb files (such as the public OS symbols) do not      ***
***    contain the required information.  Contact the group that      ***
***    provided you with these symbols if you need this command to    ***
***    work.                                                          ***
***                                                                   ***
***    Type referenced: IMAGE_NT_HEADERS32                            ***
***                                                                   ***
*************************************************************************
*************************************************************************
***                                                                   ***
***                                                                   ***
***    Your debugger is not using the correct symbols                 ***
***                                                                   ***
***    In order for this command to work properly, your symbol path   ***
***    must point to .pdb files that have full type information.      ***
***                                                                   ***
***    Certain .pdb files (such as the public OS symbols) do not      ***
***    contain the required information.  Contact the group that      ***
***    provided you with these symbols if you need this command to    ***
***    work.                                                          ***
***                                                                   ***
***    Type referenced: kernel32!pNlsUserInfo                         ***
***                                                                   ***
*************************************************************************
*************************************************************************
***                                                                   ***
***                                                                   ***
***    Your debugger is not using the correct symbols                 ***
***                                                                   ***
***    In order for this command to work properly, your symbol path   ***
***    must point to .pdb files that have full type information.      ***
***                                                                   ***
***    Certain .pdb files (such as the public OS symbols) do not      ***
***    contain the required information.  Contact the group that      ***
***    provided you with these symbols if you need this command to    ***
***    work.                                                          ***
***                                                                   ***
***    Type referenced: kernel32!pNlsUserInfo                         ***
***                                                                   ***
*************************************************************************

FAULTING_IP:
ntdll_77de0000!RtlFreeHandle+bcd
77e40267 8b4904          mov     ecx,dword ptr [ecx+4]

EXCEPTION_RECORD:  ffffffffffffffff -- (.exr 0xffffffffffffffff)
ExceptionAddress: 0000000077e40267 (ntdll_77de0000!RtlFreeHandle+0x0000000000000bcd)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 0000000000000000
   Parameter[1]: 0000000000000004
Attempt to read from address 0000000000000004

FAULTING_THREAD:  0000000000000d70

PROCESS_NAME:  SC4MDT.exe

FAULTING_MODULE: 0000000077c40000 ntdll

DEBUG_FLR_IMAGE_TIMESTAMP:  0

ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.

EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.

EXCEPTION_PARAMETER1:  0000000000000000

EXCEPTION_PARAMETER2:  0000000000000004

READ_ADDRESS:  0000000000000004

FOLLOWUP_IP:
ntdll_77de0000!RtlFreeHandle+bcd
77e40267 8b4904          mov     ecx,dword ptr [ecx+4]

ADDITIONAL_DEBUG_TEXT: 
Use '!findthebuild' command to search for the target build information.
If the build information is available, run '!findthebuild -s ; .reload' to set symbol path and load symbols. ; Enable Pageheap/AutoVerifer

DEFAULT_BUCKET_ID:  HEAP_CORRUPTION

PRIMARY_PROBLEM_CLASS:  HEAP_CORRUPTION

BUGCHECK_STR:  APPLICATION_FAULT_HEAP_CORRUPTION_NULL_CLASS_PTR_DEREFERENCE_INVALID_POINTER_READ_WRONG_SYMBOLS

LAST_CONTROL_TRANSFER:  from 0000000077e0f676 to 0000000077e40267

STACK_TEXT: 
WARNING: Stack unwind information not available. Following frames may be wrong.
0019f00c 77e0f676 029d0000 00dbaa08 0019f0b4 ntdll_77de0000!RtlFreeHandle+0xbcd
0019f104 77e0f285 00dbaa08 00dbaa10 00dbaa10 ntdll_77de0000!RtlTryEnterCriticalSection+0xe0
0019f120 772e3621 029d0000 00000000 00dbaa08 ntdll_77de0000!RtlDeactivateActivationContextUnsafeFast+0xbbe9
0019f134 004c585c 029d0000 00000000 00dbaa10 KERNEL32!HeapFree+0x14
0019f174 003b2a44 00dbaa10 02d78530 00dbaa10 SC4MDT+0x11585c
0019f19c 003b3762 02d94eb8 000001a4 00000001 SC4MDT+0x2a44
0019f248 003b5b7b 02d94eb8 00000035 3f800000 SC4MDT+0x3762
0019f274 777b89b9 00000035 00000000 00000035 SC4MDT+0x5b7b
0019f30c 003b4e4c 0019f398 004eceab 00000000 USER32!GetWindowLongW+0x402
00000000 00000000 00000000 00000000 00000000 SC4MDT+0x4e4c


SYMBOL_NAME:  heap_corruption!heap_corruption

FOLLOWUP_NAME:  MachineOwner

MODULE_NAME: heap_corruption

IMAGE_NAME:  heap_corruption

STACK_COMMAND:  ~0s ; kb

FAILURE_BUCKET_ID:  HEAP_CORRUPTION_c0000005_heap_corruption!heap_corruption

BUCKET_ID:  X64_APPLICATION_FAULT_HEAP_CORRUPTION_NULL_CLASS_PTR_DEREFERENCE_INVALID_POINTER_READ_WRONG_SYMBOLS_heap_corruption!heap_corruption

WATSON_STAGEONE_URL:  http://watson.microsoft.com/StageOne/SC4MDT_exe/1_5_1_0/4a119e4f/ntdll_dll/6_0_6001_18000/4791a783/c0000005/00060267.htm?Retriage=1

Followup: MachineOwner
---------



Jayson
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: null45 on May 18, 2009, 07:30:05 PM
Quote*** ERROR: Module load completed but symbols could not be loaded for C:\Program Files (x86)\Cogeo\SC4 Model Tweaker\SC4MDT.exe

Apparently the debugger is not finding the symbols for SC4MDT, I am guessing they would be in the SC4 Model Tweaker folder something like SC4MDT.pdb that is if your copy has debug info.

You probably need to set the the path so that the debugger can find the symbols, to do that press Ctrl+S (or File->Sybmol file path) to bring up the Symbol file path dialog
The code SRV*c:\websymbols*http://msdl.microsoft.com/download/symbols sets the path to get the Vista debugging symbols as needed more instructions are here (http://www.microsoft.com/whdc/devtools/debugging/debugstart.mspx#a)

You also probably should add C:\Program Files (x86)\Cogeo\SC4 Model Tweaker so that it might find the symbols for SC4MDT  :D


Title: Re: SC4 Model Tweaker Development/Support thread
Post by: sithlrd98 on May 18, 2009, 07:38:39 PM
I'm confused...should it be: SRV*C:\Program Files (x86)\Cogeo\SC4 Model Tweaker*http://msdl.microsoft.com/download/symbols

The reason I ask is although I now have many files with .pdp and .dll extensions , presently after a few moments , the de-bugger states: that it still doesn't have the correct symbols.

Its done...here's the info:


Microsoft (R) Windows Debugger Version 6.11.0001.404 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.

*** wait with pending attach
Symbol search path is: SRV*C:\Program Files (x86)\Cogeo\SC4 Model Tweaker*http://msdl.microsoft.com/download/symbols
Executable search path is:
ModLoad: 00000000`003b0000 00000000`006b6000   C:\Program Files (x86)\Cogeo\SC4 Model Tweaker\SC4MDT.exe
ModLoad: 00000000`77c40000 00000000`77dc0000   C:\Windows\system32\ntdll.dll
ModLoad: 00000000`77de0000 00000000`77f40000   ntdll.dll
ModLoad: 00000000`75ef0000 00000000`75f35000   C:\Windows\system32\wow64.dll
ModLoad: 00000000`75d00000 00000000`75d4e000   C:\Windows\system32\wow64win.dll
ModLoad: 00000000`75ee0000 00000000`75ee9000   C:\Windows\system32\wow64cpu.dll
ModLoad: 00000000`77260000 00000000`77370000   KERNEL32.dll
ModLoad: 00000000`10000000 00000000`10025000   s3d.dll
ModLoad: 00000000`71c50000 00000000`71d6b000   MFC42.dll
ModLoad: 00000000`776f0000 00000000`7779a000   msvcrt.dll
ModLoad: 00000000`777a0000 00000000`77870000   USER32.dll
ModLoad: 00000000`76e90000 00000000`76f20000   GDI32.dll
ModLoad: 00000000`774c0000 00000000`77586000   ADVAPI32.dll
ModLoad: 00000000`770f0000 00000000`771e0000   RPCRT4.dll
ModLoad: 00000000`75f90000 00000000`75ff0000   Secur32.dll
ModLoad: 00000000`775a0000 00000000`776e4000   ole32.dll
ModLoad: 00000000`760a0000 00000000`7612d000   OLEAUT32.dll
ModLoad: 00000000`76f20000 00000000`76ff0000   WININET.dll
ModLoad: 00000000`75ff0000 00000000`76048000   SHLWAPI.dll
ModLoad: 00000000`770a0000 00000000`770a3000   Normaliz.dll
ModLoad: 00000000`76050000 00000000`76095000   iertutil.dll
ModLoad: 00000000`77870000 00000000`7789d000   WS2_32.dll
ModLoad: 00000000`77a30000 00000000`77a36000   NSI.dll
ModLoad: 00000000`73560000 00000000`735c5000   ODBC32.dll
ModLoad: 00000000`757b0000 00000000`7594e000   COMCTL32.dll
ModLoad: 00000000`761c0000 00000000`76cd0000   SHELL32.dll
ModLoad: 00000000`77370000 00000000`773e3000   COMDLG32.dll
ModLoad: 00000000`73ba0000 00000000`73ba5000   MSIMG32.dll
ModLoad: 00000000`75620000 00000000`75662000   WINSPOOL.DRV
ModLoad: 00000000`73440000 00000000`7345c000   oledlg.dll
ModLoad: 00000000`73e60000 00000000`7400b000   gdiplus.dll
ModLoad: 00000000`76ff0000 00000000`77050000   IMM32.dll
ModLoad: 00000000`773f0000 00000000`774b8000   MSCTF.dll
ModLoad: 00000000`746a0000 00000000`746d2000   WINMM.dll
ModLoad: 00000000`74660000 00000000`74699000   OLEACC.dll
ModLoad: 00000000`72970000 00000000`7298e000   ShimEng.dll
ModLoad: 00000000`75750000 00000000`7577c000   apphelp.dll
ModLoad: 00000000`71bc0000 00000000`71c48000   NULL.dll
ModLoad: 00000000`753c0000 00000000`753de000   USERENV.dll
ModLoad: 00000000`73630000 00000000`73644000   MPR.dll
ModLoad: 00000000`71780000 00000000`71993000   NULL.dll
ModLoad: 00000000`75530000 00000000`755b0000   UxTheme.dll
ModLoad: 00000000`75a70000 00000000`75ae5000   NETAPI32.dll
ModLoad: 00000000`770b0000 00000000`770b7000   PSAPI.DLL
ModLoad: 00000000`739b0000 00000000`739c4000   MSACM32.dll
ModLoad: 00000000`75cf0000 00000000`75cf8000   VERSION.dll
ModLoad: 00000000`73680000 00000000`73685000   sfc.dll
ModLoad: 00000000`73810000 00000000`7381d000   sfc_os.dll
ModLoad: 00000000`778a0000 00000000`77a2a000   SETUPAPI.dll
ModLoad: 00000000`73cd0000 00000000`73cdc000   dwmapi.dll
ModLoad: 00000000`76d60000 00000000`76e89000   urlmon.dll
ModLoad: 00000000`73bb0000 00000000`73bb5000   SHUNIMPL.dll
ModLoad: 00000000`77590000 00000000`77599000   LPK.dll
ModLoad: 00000000`771e0000 00000000`7725d000   USP10.dll
ModLoad: 00000000`73520000 00000000`73558000   image00000000`73520000
ModLoad: 00000000`75710000 00000000`7574b000   RSAENH.dll
ModLoad: 00000000`75e50000 00000000`75e7f000   WINMMDRV.dll
ModLoad: 00000000`75ed0000 00000000`75ed4000   ksuser.dll
ModLoad: 00000000`72e40000 00000000`72e67000   MMDevAPI.DLL
ModLoad: 00000000`72e00000 00000000`72e07000   AVRT.dll
ModLoad: 00000000`72e70000 00000000`72e9d000   WINTRUST.dll
ModLoad: 00000000`74090000 00000000`74181000   CRYPT32.dll
ModLoad: 00000000`745f0000 00000000`74602000   MSASN1.dll
ModLoad: 00000000`770c0000 00000000`770e9000   imagehlp.dll
ModLoad: 00000000`72e10000 00000000`72e31000   AudioSes.DLL
ModLoad: 00000000`72ac0000 00000000`72b26000   audioeng.dll
ModLoad: 00000000`75ea0000 00000000`75ea9000   MSACM32.DRV
ModLoad: 00000000`75e40000 00000000`75e47000   MIDIMAP.dll
ModLoad: 00000000`76130000 00000000`761b4000   CLBCatQ.DLL
ModLoad: 00000000`71d70000 00000000`71eb6000   BROWSEUI.dll
ModLoad: 00000000`75470000 00000000`7552b000   PROPSYS.dll
ModLoad: 00000000`72830000 00000000`72860000   DUser.dll
ModLoad: 00000000`728b0000 00000000`72910000   tiptsf.dll
ModLoad: 00000000`73460000 00000000`73513000   WindowsCodecs.dll
ModLoad: 00000000`75a50000 00000000`75a61000   SAMLIB.dll
ModLoad: 00000000`72860000 00000000`728aa000   ntshrui.dll
ModLoad: 00000000`75b30000 00000000`75b3b000   CSCAPI.dll
ModLoad: 00000000`73bc0000 00000000`73bfa000   slc.dll
ModLoad: 00000000`71b80000 00000000`71bbc000   MSSHSQ.dll
ModLoad: 00000000`72950000 00000000`72966000   thumbcache.dll
ModLoad: 00000000`71ac0000 00000000`71b13000   SWEEPRX.dll
ModLoad: 00000000`73270000 00000000`73377000   SHDOCVW.dll
ModLoad: 00000000`6f270000 00000000`6f83e000   IEFRAME.dll
ModLoad: 00000000`75b40000 00000000`75b61000   NTMARTA.dll
ModLoad: 00000000`77050000 00000000`7709a000   WLDAP32.dll
(ac4.1674): Break instruction exception - code 80000003 (first chance)
ntdll!DbgBreakPoint:
00000000`77c84ea0 cc              int     3
0:007> g
(ac4.13e8): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
ntdll_77de0000!RtlpCoalesceFreeBlocks+0x35:
77e40043 324e02          xor     cl,byte ptr [esi+2]        ds:002b:ffff7b52=??
0:000:x86> !analyze -v
*******************************************************************************
*                                                                             *
*                        Exception Analysis                                   *
*                                                                             *
*******************************************************************************

*** ERROR: Module load completed but symbols could not be loaded for C:\Program Files (x86)\Cogeo\SC4 Model Tweaker\SC4MDT.exe
*** WARNING: Unable to verify checksum for s3d.dll
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for s3d.dll -
*** ERROR: Module load completed but symbols could not be loaded for image00000000`73520000
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for slc.dll -
*************************************************************************
***                                                                   ***
***                                                                   ***
***    Your debugger is not using the correct symbols                 ***
***                                                                   ***
***    In order for this command to work properly, your symbol path   ***
***    must point to .pdb files that have full type information.      ***
***                                                                   ***
***    Certain .pdb files (such as the public OS symbols) do not      ***
***    contain the required information.  Contact the group that      ***
***    provided you with these symbols if you need this command to    ***
***    work.                                                          ***
***                                                                   ***
***    Type referenced: kernel32!pNlsUserInfo                         ***
***                                                                   ***
*************************************************************************
*************************************************************************
***                                                                   ***
***                                                                   ***
***    Your debugger is not using the correct symbols                 ***
***                                                                   ***
***    In order for this command to work properly, your symbol path   ***
***    must point to .pdb files that have full type information.      ***
***                                                                   ***
***    Certain .pdb files (such as the public OS symbols) do not      ***
***    contain the required information.  Contact the group that      ***
***    provided you with these symbols if you need this command to    ***
***    work.                                                          ***
***                                                                   ***
***    Type referenced: kernel32!pNlsUserInfo                         ***
***                                                                   ***
*************************************************************************

FAULTING_IP:
ntdll_77de0000!RtlpCoalesceFreeBlocks+35
77e40043 324e02          xor     cl,byte ptr [esi+2]

EXCEPTION_RECORD:  ffffffffffffffff -- (.exr 0xffffffffffffffff)
ExceptionAddress: 0000000077e40043 (ntdll_77de0000!RtlpCoalesceFreeBlocks+0x0000000000000035)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 0000000000000000
   Parameter[1]: 00000000ffff7b52
Attempt to read from address 00000000ffff7b52

FAULTING_THREAD:  00000000000013e8

PROCESS_NAME:  SC4MDT.exe

ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.

EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.

EXCEPTION_PARAMETER1:  0000000000000000

EXCEPTION_PARAMETER2:  00000000ffff7b52

READ_ADDRESS:  00000000ffff7b52

FOLLOWUP_IP:
ntdll_77de0000!RtlpCoalesceFreeBlocks+35
77e40043 324e02          xor     cl,byte ptr [esi+2]

NTGLOBALFLAG:  0

APPLICATION_VERIFIER_FLAGS:  0

ADDITIONAL_DEBUG_TEXT:  Enable Pageheap/AutoVerifer

DEFAULT_BUCKET_ID:  HEAP_CORRUPTION

PRIMARY_PROBLEM_CLASS:  HEAP_CORRUPTION

BUGCHECK_STR:  APPLICATION_FAULT_HEAP_CORRUPTION_INVALID_POINTER_READ

LAST_CONTROL_TRANSFER:  from 0000000077e0f676 to 0000000077e40043

STACK_TEXT: 
0035ecdc 77e0f676 00390000 0006ae08 0035ed84 ntdll_77de0000!RtlpCoalesceFreeBlocks+0x35
0035edd4 77e0f285 0006ae08 0006ae10 0006ae10 ntdll_77de0000!RtlpFreeHeap+0x1e2
0035edf0 772e3621 00390000 00000000 0006ae08 ntdll_77de0000!RtlFreeHeap+0x14e
0035ee04 004c585c 00390000 00000000 0006ae10 KERNEL32!HeapFree+0x14
WARNING: Stack unwind information not available. Following frames may be wrong.
0035ee44 003b2a44 0006ae10 02e18530 0006ae10 SC4MDT+0x11585c
0035ee6c 003b2e37 02e34eb8 000001a4 00000001 SC4MDT+0x2a44
0035ef18 003b5292 02e34eb8 00000035 00000000 SC4MDT+0x2e37
0035ef4c 003c0fc7 003c1000 00000000 005500fe SC4MDT+0x5292
0035ef50 003c1000 00000000 005500fe 00001032 SC4MDT+0x10fc7
003c0fc7 ec8b55ff 600c7d81 75000003 40c03305 SC4MDT+0x11000
003c0fcb 600c7d81 75000003 40c03305 8b5636eb 0xec8b55ff
003c0fcf 75000003 40c03305 8b5636eb e8560875 0x600c7d81
003c0fd3 40c03305 8b5636eb e8560875 fffff06b 0x75000003
003c0fd7 8b5636eb e8560875 fffff06b 1774c085 0x40c03305
003c0fdb e8560875 fffff06b 1774c085 75207039 0x8b5636eb
003c0fdf fffff06b 1774c085 75207039 1475ff12 0xe8560875
003c0fe3 1774c085 75207039 1475ff12 ff1075ff 0xfffff06b
003c0fe7 75207039 1475ff12 ff1075ff 50560c75 0x1774c085
003c0feb 1475ff12 ff1075ff 50560c75 fffed7e8 0x75207039
003c0fef ff1075ff 50560c75 fffed7e8 ff10ebff 0x1475ff12
003c0ff3 50560c75 fffed7e8 ff10ebff 75ff1475 0xff1075ff
003c0ff7 fffed7e8 ff10ebff 75ff1475 0c75ff10 0x50560c75
003c0ffb ff10ebff 75ff1475 0c75ff10 2c15ff56 0xfffed7e8
003c0fff 75ff1475 0c75ff10 2c15ff56 5e004ef7 0xff10ebff
003c1003 0c75ff10 2c15ff56 5e004ef7 0010c25d SHLWAPI!_imp__RegDeleteKeyW+0x1
003c1007 2c15ff56 5e004ef7 0010c25d dab8046a 0xc75ff10
003c100b 5e004ef7 0010c25d dab8046a e8004e4d 0x2c15ff56
003c100f 0010c25d dab8046a e8004e4d 0010576c 0x5e004ef7
003c1013 dab8046a e8004e4d 0010576c 7589f18b 0x10c25d
003c1017 e8004e4d 0010576c 7589f18b 9406c7f0 0xdab8046a
003c101b 0010576c 7589f18b 9406c7f0 83004f0d 0xe8004e4d
003c101f 7589f18b 9406c7f0 83004f0d 8300fc65 0x10576c
003c115f c0850000 76ff1475 50d7ff20 ffeeb2e8 COMCTL32!CToolbar::PaintAdjustLine+0x3bb
003c1167 50d7ff20 ffeeb2e8 85f08bff 5fe175f6 0xc0850000
003c116b ffeeb2e8 85f08bff 5fe175f6 c68bc35e 0x50d7ff20
003c116f 85f08bff 5fe175f6 c68bc35e ff8bf9eb 0xffeeb2e8
003c1173 5fe175f6 c68bc35e ff8bf9eb 85f18b56 0x85f08bff
003c1177 c68bc35e ff8bf9eb 85f18b56 830674f6 0x5fe175f6
003c117b ff8bf9eb 85f18b56 830674f6 7500207e 0xc68bc35e
003c117f 85f18b56 830674f6 7500207e 5ec03304 0xff8bf9eb
003c1183 830674f6 7500207e 5ec03304 ff068bc3 0x85f18b56
003c1187 7500207e 5ec03304 ff068bc3 00012890 0x830674f6
003c118b 5ec03304 ff068bc3 00012890 75c08500 0x7500207e
003c118f ff068bc3 00012890 75c08500 e8ce8b09 0x5ec03304
003c1193 00012890 75c08500 e8ce8b09 ffffff9b 0xff068bc3
003c1197 75c08500 e8ce8b09 ffffff9b f685f08b 0x12890
003c119b e8ce8b09 ffffff9b f685f08b ce8b1174 0x75c08500
003c119f ffffff9b f685f08b ce8b1174 f08b04eb 0xe8ce8b09
003c11a3 f685f08b ce8b1174 f08b04eb 88e8c88b 0xffffff9b
003c11a7 ce8b1174 f08b04eb 88e8c88b 85ffffff 0xf685f08b
003c11ab f08b04eb 88e8c88b 85ffffff 8bf375c0 0xce8b1174
003c11af 88e8c88b 85ffffff 8bf375c0 8bc35ec6 0xf08b04eb
003c11b3 85ffffff 8bf375c0 8bc35ec6 ec8b55ff 0x88e8c88b
003c11b7 8bf375c0 8bc35ec6 ec8b55ff 75ff5756 0x85ffffff
003c11bb 8bc35ec6 ec8b55ff 75ff5756 303d8b08 0x8bf375c0
003c11bf ec8b55ff 75ff5756 303d8b08 ff004ef8 0x8bc35ec6
003c11c3 75ff5756 303d8b08 ff004ef8 835febd7 0xec8b55ff
003c11c7 303d8b08 ff004ef8 835febd7 74001c7d SHLWAPI!StrCmpLogicalW+0x5
003c11d3 74001c7d 70e8561e 85ffffee ff2474c0 0x303d8b08
003c11d7 70e8561e 85ffffee ff2474c0 75ff1475 gdiplus!uc2gi_ArabicBmp <PERF> (gdiplus+0x1a1c7d)
003c11db 85ffffee ff2474c0 75ff1475 0c75ff10 0x70e8561e
003c11df ff2474c0 75ff1475 0c75ff10 502070ff 0x85ffffee
003c11e3 75ff1475 0c75ff10 502070ff fffcdfe8 0xff2474c0
003c11e7 0c75ff10 502070ff fffcdfe8 ff10ebff SHLWAPI!_imp__RegDeleteKeyW+0x1
003c11eb 502070ff fffcdfe8 ff10ebff 75ff1475 0xc75ff10
003c11ef fffcdfe8 ff10ebff 75ff1475 0c75ff10 0x502070ff
003c11f3 ff10ebff 75ff1475 0c75ff10 8415ff56 0xfffcdfe8
003c11f7 75ff1475 0c75ff10 8415ff56 83004ef8 0xff10ebff
003c11fb 0c75ff10 8415ff56 83004ef8 7400187d SHLWAPI!_imp__RegDeleteKeyW+0x1
003c11ff 8415ff56 83004ef8 7400187d d7ff561c 0xc75ff10
003c1203 83004ef8 7400187d d7ff561c 1574c085 0x8415ff56
003c1207 7400187d d7ff561c 1574c085 ff1c75ff 0x83004ef8
003c120b d7ff561c 1574c085 ff1c75ff 75ff1875 gdiplus!uc2gi_ArabicBmp <PERF> (gdiplus+0x1a187d)
003c120f 1574c085 ff1c75ff 75ff1875 1075ff14 0xd7ff561c
003c1213 ff1c75ff 75ff1875 1075ff14 560c75ff 0x1574c085
003c1217 75ff1875 1075ff14 560c75ff ffff96e8 0xff1c75ff
003c121b 1075ff14 560c75ff ffff96e8 56026aff SHLWAPI!`string'+0x2d
003c121f 560c75ff ffff96e8 56026aff f85815ff 0x1075ff14
003c1223 ffff96e8 56026aff f85815ff f08b004e 0x560c75ff
003c1227 56026aff f85815ff f08b004e 9b75f685 0xffff96e8
003c122b f85815ff f08b004e 9b75f685 c25d5e5f 0x56026aff
003c122f f08b004e 9b75f685 c25d5e5f 546a0018 0xf85815ff
003c1233 9b75f685 c25d5e5f 546a0018 4deeb2b8 0xf08b004e
003c1237 c25d5e5f 546a0018 4deeb2b8 5542e800 0x9b75f685
003c123b 546a0018 4deeb2b8 5542e800 006a0010 0xc25d5e5f
003c123f 4deeb2b8 5542e800 006a0010 ffed5ee8 0x546a0018
003c1243 5542e800 006a0010 ffed5ee8 75c085ff 0x4deeb2b8
003c1247 006a0010 ffed5ee8 75c085ff ebc03304 0x5542e800
003c124b ffed5ee8 75c085ff ebc03304 087d8b7d SC4MDT+0x2f0010
006a0010 36b836b4 36c036bc 36c836c4 36d036cc 0xffed5ee8
006a0014 36c036bc 36c836c4 36d036cc 36d836d4 0x36b836b4
006a0018 36c836c4 36d036cc 36d836d4 36e036dc 0x36c036bc
006a001c 36d036cc 36d836d4 36e036dc 36e836e4 0x36c836c4
006a0020 36d836d4 36e036dc 36e836e4 36f036ec 0x36d036cc
006a0024 36e036dc 36e836e4 36f036ec 36f836f4 0x36d836d4
006a0028 36e836e4 36f036ec 36f836f4 370036fc 0x36e036dc
006a002c 36f036ec 36f836f4 370036fc 37083704 0x36e836e4
006a0030 36f836f4 370036fc 37083704 3710370c 0x36f036ec
006a0034 370036fc 37083704 3710370c 37183714 0x36f836f4
006a0038 37083704 3710370c 37183714 3720371c 0x370036fc
006a003c 3710370c 37183714 3720371c 37283724 0x37083704
006a0040 37183714 3720371c 37283724 3730372c 0x3710370c
006a0044 3720371c 37283724 3730372c 37383734 0x37183714
006a0048 37283724 3730372c 37383734 3740373c 0x3720371c
006a004c 3730372c 37383734 3740373c 37483744 0x37283724
006a0050 37383734 3740373c 37483744 3750374c 0x3730372c
006a0054 3740373c 37483744 3750374c 37583754 0x37383734
006a0058 37483744 3750374c 37583754 3760375c 0x3740373c
006a005c 3750374c 37583754 3760375c 37683764 0x37483744
006a0060 37583754 3760375c 37683764 3770376c 0x3750374c
006a0064 3760375c 37683764 3770376c 37783774 0x37583754
006a0068 37683764 3770376c 37783774 3780377c 0x3760375c
006a006c 3770376c 37783774 3780377c 37883784 0x37683764
006a0070 37783774 3780377c 37883784 3790378c 0x3770376c
006a0074 3780377c 37883784 3790378c 37983794 0x37783774
006a0078 37883784 3790378c 37983794 37a0379c 0x3780377c
006a007c 3790378c 37983794 37a0379c 37a837a4 0x37883784
006a0080 37983794 37a0379c 37a837a4 37b037ac 0x3790378c
006a0084 37a0379c 37a837a4 37b037ac 37b837b4 0x37983794
006a0088 37a837a4 37b037ac 37b837b4 37c037bc 0x37a0379c
006a008c 37b037ac 37b837b4 37c037bc 37c837c4 0x37a837a4
006a0090 37b837b4 37c037bc 37c837c4 37d037cc 0x37b037ac
006a0094 37c037bc 37c837c4 37d037cc 380437ec 0x37b837b4
006a0098 37c837c4 37d037cc 380437ec 3834381c 0x37c037bc
006a009c 37d037cc 380437ec 3834381c 3864384c 0x37c837c4
006a00a0 380437ec 3834381c 3864384c 3894387c 0x37d037cc
006a00a4 3834381c 3864384c 3894387c 38c438ac 0x380437ec
006a00a8 3864384c 3894387c 38c438ac 38f838dc 0x3834381c
006a00ac 3894387c 38c438ac 38f838dc 390038fc 0x3864384c
006a00b0 38c438ac 38f838dc 390038fc 3a043904 0x3894387c
006a00b4 38f838dc 390038fc 3a043904 3a243a14 0x38c438ac
006a00b8 390038fc 3a043904 3a243a14 3a2c3a28 0x38f838dc
006a00bc 3a043904 3a243a14 3a2c3a28 3a383a30 0x390038fc
006a00c0 3a243a14 3a2c3a28 3a383a30 3a403a3c 0x3a043904
006a00c4 3a2c3a28 3a383a30 3a403a3c 3a483a44 0x3a243a14
006a00c8 3a383a30 3a403a3c 3a483a44 3a503a4c 0x3a2c3a28
006a00cc 3a403a3c 3a483a44 3a503a4c 3a583a54 0x3a383a30
006a00d0 3a483a44 3a503a4c 3a583a54 3a603a5c 0x3a403a3c
006a00d4 3a503a4c 3a583a54 3a603a5c 3a683a64 0x3a483a44
006a00d8 3a583a54 3a603a5c 3a683a64 3a703a6c 0x3a503a4c
006a00dc 3a603a5c 3a683a64 3a703a6c 3a783a74 0x3a583a54
006a00e0 3a683a64 3a703a6c 3a783a74 3a803a7c 0x3a603a5c
006a00e4 3a703a6c 3a783a74 3a803a7c 3a883a84 0x3a683a64
006a00e8 3a783a74 3a803a7c 3a883a84 3a903a8c 0x3a703a6c
006a00ec 3a803a7c 3a883a84 3a903a8c 3a983a94 0x3a783a74
006a00f0 3a883a84 3a903a8c 3a983a94 3aa03a9c 0x3a803a7c
006a00f4 3a903a8c 3a983a94 3aa03a9c 3aa83aa4 0x3a883a84
006a00f8 3a983a94 3aa03a9c 3aa83aa4 3ab03aac 0x3a903a8c
006a00fc 3aa03a9c 3aa83aa4 3ab03aac 3ab83ab4 0x3a983a94
006a0100 3aa83aa4 3ab03aac 3ab83ab4 3ac03abc 0x3aa03a9c
006a0104 3ab03aac 3ab83ab4 3ac03abc 3ac83ac4 0x3aa83aa4
006a0108 3ab83ab4 3ac03abc 3ac83ac4 3ad03acc 0x3ab03aac
006a010c 3ac03abc 3ac83ac4 3ad03acc 3ad83ad4 0x3ab83ab4
006a0110 3ac83ac4 3ad03acc 3ad83ad4 3ae03adc 0x3ac03abc
006a0114 3ad03acc 3ad83ad4 3ae03adc 3ae83ae4 0x3ac83ac4
006a0118 3ad83ad4 3ae03adc 3ae83ae4 3af03aec 0x3ad03acc
006a011c 3ae03adc 3ae83ae4 3af03aec 3af83af4 0x3ad83ad4
006a0120 3ae83ae4 3af03aec 3af83af4 3b003afc 0x3ae03adc
006a0124 3af03aec 3af83af4 3b003afc 3b083b04 0x3ae83ae4
006a0128 3af83af4 3b003afc 3b083b04 3b103b0c 0x3af03aec
006a012c 3b003afc 3b083b04 3b103b0c 3b183b14 0x3af83af4
006a0130 3b083b04 3b103b0c 3b183b14 3b203b1c 0x3b003afc
006a0134 3b103b0c 3b183b14 3b203b1c 3b283b24 0x3b083b04
006a0138 3b183b14 3b203b1c 3b283b24 3b303b2c 0x3b103b0c
006a013c 3b203b1c 3b283b24 3b303b2c 3b443b34 0x3b183b14
006a0140 3b283b24 3b303b2c 3b443b34 3b4c3b48 0x3b203b1c
006a0144 3b303b2c 3b443b34 3b4c3b48 3b543b50 0x3b283b24
006a0148 3b443b34 3b4c3b48 3b543b50 3b5c3b58 0x3b303b2c
006a014c 3b4c3b48 3b543b50 3b5c3b58 3b903b60 0x3b443b34
006a0150 3b543b50 3b5c3b58 3b903b60 3b983b94 0x3b4c3b48
006a0154 3b5c3b58 3b903b60 3b983b94 3ba03b9c 0x3b543b50
006a0158 3b903b60 3b983b94 3ba03b9c 3ba83ba4 0x3b5c3b58
006a015c 3b983b94 3ba03b9c 3ba83ba4 3bb03bac 0x3b903b60
006a0160 3ba03b9c 3ba83ba4 3bb03bac 3bb83bb4 0x3b983b94
006a0164 3ba83ba4 3bb03bac 3bb83bb4 3bc03bbc 0x3ba03b9c
006a0168 3bb03bac 3bb83bb4 3bc03bbc 3bc83bc4 0x3ba83ba4
006a016c 3bb83bb4 3bc03bbc 3bc83bc4 3bd03bcc 0x3bb03bac
006a0170 3bc03bbc 3bc83bc4 3bd03bcc 3bd83bd4 0x3bb83bb4
006a0174 3bc83bc4 3bd03bcc 3bd83bd4 3be03bdc 0x3bc03bbc
006a0178 3bd03bcc 3bd83bd4 3be03bdc 3be83be4 0x3bc83bc4
006a017c 3bd83bd4 3be03bdc 3be83be4 3c103bec 0x3bd03bcc
006a0180 3be03bdc 3be83be4 3c103bec 3c203c1c 0x3bd83bd4
006a0184 3be83be4 3c103bec 3c203c1c 3c343c30 0x3be03bdc
006a0188 3c103bec 3c203c1c 3c343c30 3c3c3c38 0x3be83be4
006a018c 3c203c1c 3c343c30 3c3c3c38 3c443c40 0x3c103bec
006a0190 3c343c30 3c3c3c38 3c443c40 3c4c3c48 0x3c203c1c
006a0194 3c3c3c38 3c443c40 3c4c3c48 3c543c50 0x3c343c30
006a0198 3c443c40 3c4c3c48 3c543c50 3c5c3c58 0x3c3c3c38
006a019c 3c4c3c48 3c543c50 3c5c3c58 3c643c60 0x3c443c40
006a01a0 3c543c50 3c5c3c58 3c643c60 3c6c3c68 0x3c4c3c48
006a01a4 3c5c3c58 3c643c60 3c6c3c68 3c743c70 0x3c543c50
006a01a8 3c643c60 3c6c3c68 3c743c70 3c7c3c78 0x3c5c3c58
006a01ac 3c6c3c68 3c743c70 3c7c3c78 3c843c80 0x3c643c60
006a01b0 3c743c70 3c7c3c78 3c843c80 3c8c3c88 0x3c6c3c68
006a01b4 3c7c3c78 3c843c80 3c8c3c88 3c943c90 0x3c743c70
006a01b8 3c843c80 3c8c3c88 3c943c90 3c9c3c98 0x3c7c3c78
006a01bc 3c8c3c88 3c943c90 3c9c3c98 3ca43ca0 0x3c843c80
006a01c0 3c943c90 3c9c3c98 3ca43ca0 3cac3ca8 0x3c8c3c88
006a01c4 3c9c3c98 3ca43ca0 3cac3ca8 3cb43cb0 0x3c943c90
006a01c8 3ca43ca0 3cac3ca8 3cb43cb0 3cbc3cb8 0x3c9c3c98
006a01cc 3cac3ca8 3cb43cb0 3cbc3cb8 3cc43cc0 0x3ca43ca0
006a01d0 3cb43cb0 3cbc3cb8 3cc43cc0 3ccc3cc8 0x3cac3ca8
006a01d4 3cbc3cb8 3cc43cc0 3ccc3cc8 3cd43cd0 0x3cb43cb0
006a01d8 3cc43cc0 3ccc3cc8 3cd43cd0 3cdc3cd8 0x3cbc3cb8
006a01dc 3ccc3cc8 3cd43cd0 3cdc3cd8 3ce43ce0 0x3cc43cc0
006a01e0 3cd43cd0 3cdc3cd8 3ce43ce0 3cec3ce8 0x3ccc3cc8
006a01e4 3cdc3cd8 3ce43ce0 3cec3ce8 3cf43cf0 0x3cd43cd0
006a01e8 3ce43ce0 3cec

SYMBOL_NAME:  heap_corruption!heap_corruption

FOLLOWUP_NAME:  MachineOwner

MODULE_NAME: heap_corruption

IMAGE_NAME:  heap_corruption

DEBUG_FLR_IMAGE_TIMESTAMP:  0

STACK_COMMAND:  ~0s ; kb

FAILURE_BUCKET_ID:  HEAP_CORRUPTION_c0000005_heap_corruption!heap_corruption

BUCKET_ID:  X64_APPLICATION_FAULT_HEAP_CORRUPTION_INVALID_POINTER_READ_heap_corruption!heap_corruption

WATSON_IBUCKET:  1281085321

WATSON_IBUCKETTABLE:  1

WATSON_STAGEONE_URL:  http://watson.microsoft.com/StageOne/SC4MDT_exe/1_5_1_0/4a119e4f/ntdll_dll/6_0_6001_18000/4791a783/c0000005/00060043.htm?Retriage=1

Followup: MachineOwner
---------



Got to cut this short...work in the morning.

Jayson
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: null45 on May 19, 2009, 01:58:02 PM
my fault for not specifying that part clearly.

Add SRV*c:\websymbols*http://msdl.microsoft.com/download/symbols where C:\websymbols is the location to store the Debugging symbols for Vista downloaded from Microsoft.

And the on a new line add C:\Program Files (x86)\Cogeo\SC4 Model Tweaker to hopefully find the debug info for SC4MDT.

the end result would look like
SRV*c:\websymbols*http://msdl.microsoft.com/download/symbols
C:\Program Files (x86)\Cogeo\SC4 Model Tweaker
 

I hope that helps  :thumbsup:
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: sithlrd98 on May 19, 2009, 02:00:05 PM
I will try it later when I'm at home...thanks !

Jayson

OK , after trying the revised code , I still am getting symbol errors. Maybe its just me!

Title: Re: SC4 Model Tweaker Development/Support thread
Post by: sdc16064 on May 26, 2009, 04:30:19 PM
How do you rotate/scale default Maxis buildings?
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on May 28, 2009, 12:07:53 PM
Hi again,

I have just uploaded a new test version (V1.70 - TEST) of the tool.

The download link is: <Link removed. Get V2.00 from the LEX (http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=2072)>

New features:
- Re-orientate Model operation (for models with 20-Z/R views only).
- Enhanced Scale Model operation (now allows scaling for each of the three dimensins separately)
- Works under Vista too.
- The "Application Look" feature has been removed.
(see the notes below)

Notes:
- Unlike in the reader, the X, Y and Z axes have their "normal" meaning (Z refers to the height). What is causing all the confusion is just a naming inconsistency in the S3D.DLL's interface, which was propagated even to the reader's user interface.
- There is no documentation (help) for the new features yet, but you should be able to figure them out easily.
- The reorient operation works for models with 20-Z/R views only ("normal" BATs). It doesn't really change anything in the S3D files themselves, instead it renumbers their instance IDs, effectively "rotating" them by multiples of 90° - see the description in my previous posts. It has been implemented as a separate operation (and not under a more generic "rotation" operation), because otherwise it might cause confusion to some users. This operation might prove useful when you want to change some models so that they all have the same "orientation", for cases like making a prop-family.
- The scale operation can now be applied to each one of the three dimensions separately; can prove useful for "de-squashing" or "deforming".
- The tool now operates under Vista too, with some very few occasional crashes. Always backup your work before modifying it with this tool. Re-trying tp perform the same operation usually works though. The crashes are attributed to the very different versions of the tools used to make this application and S3D.DLL (and the reader). That tool was actually 3 versions older, and it's indeed a surprise that (S3D.DLL) still works with the newer tool (even if with some occasional crashes under Vista).
- The "Application Look" feature has been removed, and the native/default implementation has been chosen instead. This means that you will no longer be able to select "themes" like "Office 2007 - Aqua" or "Office 2003", but the application look will depend on your operating system. For example, under XP it will look like a "normal" XP application, under Vista it will feature the "aero" look, etc. I think this is very acceptable, and actually preferable to many users.

Credits:
- Special thanks to Jayson (sithlrd98) for the detailed testing and feedback he has provided, making it possible to make this tool working under Vista too.

INSTALLATION
- Download and install version 1.00 from the LEX, if you haven't already.
- Go to the installation folder and copy the executable somewhere else (outside of the installation folder). This way it will be much easier to revert to V1.00 later.
- Get the (new) executable from the download link and overwrite the original (in the installation folder).
- Run the program.
- All commands should appear in the toolbar and display tips, and all menu items (in both the main and the popup menus) should display the keyboard shortcuts (take a look at this pic).

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg503.imageshack.us%2Fimg503%2F5742%2Fsc4mdtv170.jpg&hash=bd086b90d9d79c4aa606806b3ccb3921b701f231)

If this is not the case, try using the "Reset", "Reset All" or "Reset my usage data" commands in the "Customize" dialog (right-click on the toolbar to open this dialog). Close and restart the application. If it still doesn't work, try uninstalling (from the Control Panel - Add/Remove Programs) and re-installing V1.00, and then overwrite it with the new version, without running the program (V1.00), so that it won't record any "usage data". Note: uninstalling the application removes everything in the installation folder and the registry, ie it leaves off no "garbage".

Others:
- My evaluation version of MS-VStudio 9.0 expires in 8 days. So please report your findings before the 4th of June. No changes or fixes will be possible to be performed after that date.
- As time presses, it will only be possible to add one additional feature to the program. I'm considering a "Merge" or "Append" model command, or a "Material Replacer", but I'm open to suggestions too.
- But for this to happen, I need some help with the documentation. There is no documentation for any of the new features (since version 1.00) and these might prove quite time-consuming for a non-native speaker. It would be of great help if some member(s) could undertake writing the (missing) help topics for the new operations. Take a look in the help file and see how these are made for the Scale and Set Trnsparency operations. Then I would have the time to implement the new feature(s). Otherwise I will have to write them myself.
- After the expiration date mentioned above, I could disclose the application's code to anybody who could perform updates or additions. Requires knowledge of the MFC library (and working procedures employed by MS Visual Studio - wizards, document/view architecure, commands etc).

Happy Testing!


========================================

Replies to your posts:

@sdc16064: Pls take a look at the documentation, esp the Topic "Further Modding Information", it contains some techniques and tips. Do not perform operations on the simcity dats, instead take (local) copies of the models you wish to mod, preferably with changed IDs. Also rotating "normal" BATs (with 20 Z/R views) is not possible, beacuse of the reasons deiscussed in previous posts in this thread (lack of back faces, stretched textures). For these you can use the Re-Orientate command instead (see description above).
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: RippleJet on May 28, 2009, 02:22:06 PM
Barby and I just tested to move a bat rendered offset to be centered again.

Even if it did require some checking in Reader first to see how much the bat actually was offset,
the actual correction and movement of the bat is so much faster than doing it manually in Excel... :thumbsup: &apls


Quote from: cogeo on May 28, 2009, 12:07:53 PM
- Unlike in the reader, the X, Y and Z axes have their "normal" meaning (Z refers to the height). What is causing all the confusion is just a naming inconsistency in the S3D.DLL's interface, which was propagated even to the reader's user interface.

Or was it intentional?
If the Y and Z axes switch, the coordinate system also changes from being a right-handed system to a left-handed system, which isn't used as often...
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: sithlrd98 on May 30, 2009, 05:30:06 AM
OK , as I pm'ed Coego , the tool works in Win 7 also. The results I got were pretty much like the last few Debug versions I tested. It may crash for really no reason at all , although before a crash , the tool completes the desired operation. I can only say , do only one operation per session , then save. It is possible to "Batch" mod in this tool , and you usually have a 50% or greater success rate.

I'm still not exactly sure what "Material Replacer" is , but the description given to me sounds pretty useful ;D

Jayson
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: MAS71 on June 03, 2009, 04:16:57 AM
@Cogeo
Thank you for this nice tool which is very usefull and easy to use !  :thumbsup:
Especialy, It's so easy to rescaling and models move to Off-Set position without re-rennderring(re-export) as Ripplejet san said. ;)

I have a request(opinion) for your  tool to be more better. :)
When after it changed scale(or move) to models, I don't have any way to confirm a diifernce how many it scaled(moved) is.
If it possible, I want to see(know) value each differnce of Original's and Modified's.
;)


Thank you again for this nice toop Cogeo :)
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on June 03, 2009, 11:58:25 AM
I don't understand, maybe I'm missing something? The offset amount or the scaling factor are entered by the user, and are applied on the S3D file(s) selected. Eg if you enter an offset of 20 meters, the model will be moved by 20 meters (unless the program crahses, or you get error messages), and not less or more. So what is this "confirmation" needed for? If the model is NOT moved by the specified amount, then this should instead be reported as a bug. If the action cannot be completed, you will get error messages. And the reason can hardly be insufficient memory or something like that, I can only think of a corrupted S3D file.

It is suggested that you work on copies of the models you wish to modify, not on the original. Pls take a look at the documentation, esp the Topic "Further Modding Information", it contains some techniques and tips. Do not perform operations on the simcity dats, instead take (local) copies of the models you wish to mod, preferably with changed IDs.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: sithlrd98 on June 03, 2009, 02:50:58 PM
Hello again Mas san,
I am also not sure of your question. After you move or manipulate the S3D , then save , you will need to open the file that you changed in Reader to confirm that it has indeed changed . The IIDs will still be the same so if , for instance , you are trying to make your Sakura offset , you will need to change the IID so that you will have a "new" Sakura prop. If this is not what you are asking , then please disregard ;D

Jayson

こんにちは再度Masサン、私はまたあなたの質問の確実ではない。または処理するS3Dを動いた後、そしてを除けば、全く変わったことを確認するためにあなたが読者で変わったファイルを開ける必要がある。 IIDsはまだ"を有するように例えばあなた相殺されるあなたの佐倉を作ることを試みれば同じそうIIDを変える必要があるである; new" 佐倉の支柱。 尋ねていることこれがでなかったら、無視しなさい; D Jayson
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: MAS71 on June 03, 2009, 04:16:15 PM
@Cogeo and Sithlrd98
Thank you reply, and I'm sorry to my post that hard to understand for...no good Eng :-[
My request is that as Jayson said. "$Deal"$
Quotethen save , you will need to open the file that you changed in Reader to confirm that it has indeed changed .
i.e, like these.... "$Deal"$
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg197.imageshack.us%2Fimg197%2F28%2Fimage1c.gif&hash=d330da39788bb257dc44a798096cb0bbb526ba43)

to the last, This is a personal small demand to use more useful. ;)

Thank you again took up to your time, both. :)
-Mas'71
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on June 05, 2009, 04:06:52 PM
@MAS71: Now I see what you mean. Unfortunately I can't perform any updates for the time being, as my test/evaluation version of the development tool expires today. Still, what you are asking for could only be implemented with some much reduced functionality, ie the "editing actions" you have taked would only be displayed during the current editing session. They wouldn't be "remembered" if you close and re-open the file, simply because the .dat file format doesn't contain such information - it contains the S3D (and other files) data, not editing actions.
Title: SC4 Model Tweaker Development Version 2.00 Released
Post by: cogeo on June 05, 2009, 04:08:22 PM
I have just uploaded Version 2.00 of SC4 Model Tweaker on the LEX. It's about the same as V1.70, only the documentation has been updated, and no warning is displayed at start-up, ie it's an "official" version.

As said above, no further changes are possible for the moment, but I will see what I can do about it. But it won't be very soon.

Still, this thread is not closed, you can continue reporting problems or posting requests here.

Have a nice Tweaking experience!
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: MAS71 on June 05, 2009, 07:15:57 PM
@Cogeo
Thank you reply and your understanding. :)
Quote from: Cogeoie the "editing actions" you have taked would only be displayed during the current editing session.
They wouldn't be "remembered" if you close and re-open the file, simply because the .dat file format doesn't contain such information - it contains the S3D (and other files) data, not editing actions.
Yeh yeh, I know that. ;)
I though that want to confirm to thire infomations(current editing-actions) before 'Save' them. :)

well, I'm looking forward to you update a tool when you impossible to do.
I have to say again that It's really useful tool !
Thank you again for your creation Cogeo !!  :thumbsup:

-Mas'71
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: sdc16064 on January 01, 2010, 03:52:58 PM
Is there a possible way to rotate models by 45 degrees instead of 90?
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Andreas on January 01, 2010, 04:09:10 PM
No, that won't work, since the models are rendered in 90 degree steps in gmax. The only way to create 45 degree models is rendering them this way.
Title: SC4 Model Tweaker: New Version to be Developed
Post by: cogeo on February 11, 2010, 02:57:17 PM
Hi all,

I would like to announce that there is going to be a newer version of SC4 Model Tweaker.

The development tool will be MS Visual Studio 2010 Beta 2. This evaluation version will expire by the end of June. It's pre-release, time-sensitive, unsupported software. However, I have tested it and it looks really stable to me, plus there is enough time to fix or work around any possible problems found.

The new version will have some any bugs found in version 2 fixed, plus implement new features (operations).

With the previous versions, there have been reported problems (crashes) running the program under Windows Vista (I'm still unsure about Windows 7). This is possibly due to version conflict between the MFC dlls used by the S3D library and the ones actually installed in Windows Vista (under Windows XP, the very same program runs without any problem). I'm looking for members offering to test-evaluate the tool, particularly under Windows Vista and 7.

The new version, as all previous versions, will be 32-bit as well. While Visual Studio can generate 64-bit applications, the S3D library (S3D.DLL) is 32-bit, and so must be the application calling it. Another alternative could be discarding S3D.DLL completely (and this would solve the crashes problem too), however the question is what to replace it with. If you have any suggestion, or a detailed description of the S3D format, please post.

I haven't yet decided which operations to implement. There are many thoughts and ideas, but as time is limited, I guess I will eventually have to choose only some few ones. As this is tool made specifically for the SC4 modding community, I would like to ask you to post your requests, ideas or suggestions in this thread. Not all requests will be implemented, however if yours looks interesting and useful, it has good chances. Some generic guidelines:
- The requested operarations should be exclusively on S3D files (all other types are ignored by the program).
- The program does not create (new) S3D files, it only modifies them.
- Request operations that are going to save developers' time, eg tedious and repetitive ones, so that's really worth implementing them.
- Do not request features that you are going to use once or twice.
- Provide a detailed description of the operations you are requesting.

I'm going to listen to your requests carefully and comment accordingly.

I would welcome any help related to the documentation of the package (esp from native English speakers).

Looking forward to your replies.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Jonathan on February 11, 2010, 11:46:42 PM
If you want the spec for the S3D you can get it here: http://old_wiki.modthesims2.com/S3D but I dont think its complete.

Also the reader works fine on win 7 / vista with the S3D.dll maybe you can see why it works?

Jonathan
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Diggis on February 12, 2010, 04:14:56 AM
Quote from: cogeo on February 11, 2010, 02:57:17 PM
- The program does not create (new) S3D files, it only modifies them.

Just want to query this one.  The one thing I could see as being handy is the ability to change the GUI IDs of a model.  If I want to modify a model which is part of someone elses work it would be useful to modify it and give it a new ID so I get a second copy of it.  It's not creating a new S3D file as such more creating a copy.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on February 12, 2010, 11:51:38 AM
Quote from: Jonathan on February 11, 2010, 11:46:42 PM
If you want the spec for the S3D you can get it here: http://old_wiki.modthesims2.com/S3D but I dont think its complete.
Indeed, not complete, a lot of "unknown" fields. Another link maybe? Anybody else?

Quote from: Jonathan on February 11, 2010, 11:46:42 PM
Also the reader works fine on win 7 / vista with the S3D.dll maybe you can see why it works?
The S3D.DLL is the same in both cases of course, but there are differences in the calling environment. For example, the tweaker is unicode, while the reader is not; this forced to me to change the dll's interface, to make it work for unicode applications. Also the tweaker uses the static version of the MFC library, while the reader uses the dynamic one (a non-option, again). And finally the tool used to make the tweaker is 10 years newer, while the reader and S3D.DLL were made with the same version of tool (VC 6). I have checked the code again and again and there are no problems there (besides, it does work under XP), so the problem can be attributed to differences in the operating environment (the MFC dlls' version is my guess).

I will need testers (Windows Vista and/or 7 owners, who do experience the crash problem, with the current version) to test this further.

Quote from: Diggis on February 12, 2010, 04:14:56 AM
Just want to query this one.  The one thing I could see as being handy is the ability to change the GUI IDs of a model.  If I want to modify a model which is part of someone elses work it would be useful to modify it and give it a new ID so I get a second copy of it.  It's not creating a new S3D file as such more creating a copy.
Don't understand exactly, can't this be done by using the reader alone? I mean select the models, copy-and-paste them and then mass-renumber them (using the TGI editor function). And it's not tedious at all. Do you think it's really worth making this? Or I'm missing something here?
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Diggis on February 12, 2010, 12:35:24 PM
Quote from: cogeo on February 12, 2010, 11:51:38 AM
Don't understand exactly, can't this be done by using the reader alone? I mean select the models, copy-and-paste them and then mass-renumber them (using the TGI editor function). And it's not tedious at all. Do you think it's really worth making this? Or I'm missing something here?

That will change the GID of the S3D files and the FSH files, however it won't change the links to the FSH files from the S3D files, which would require editing each of the 20 S3D files.  While on a small model this may not be so bad it could be quite laborious on a large model with multiple FSH files for each S3D file.

I could be wrong about the process as I've never actually attempted it, only considered it.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: dedgren on February 12, 2010, 12:42:30 PM
QuoteI would like to announce that there is going to be a newer version of SC4 Model Tweaker.

That is absolutely fantastic news!  Thank you, cogeo, for putting so much time and effort into this great tool.


David
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Jonathan on February 12, 2010, 12:51:11 PM
Cogeo, I think what Diggis is suggesting is the same thing as what I suggested in my PM to about "finding and replacing" the IIDs of textures in S3Ds:
QuoteOne really really useful (far more useful than my previous suggestion) feature would be bulk find and replaceing texture IIDs in S3D files.
What I mean is, there are say 20 S3D files each contain a material with the IID 0x12345678, if I want to change all of the materials which IID is 0x12345678 to 0x87654321 then in the reader I have to open the S3D open the mats tab, select the material, right click and select Change Instance/Name, paste the new instance, click OK, Click Apply move on to the next, when you have 20 models this is boring but when you have many more it's near impossible. So could you add a feature which finds all the materials in a selection of S3D files which matches an IID and the replace all of it with a new IID?
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Diggis on February 12, 2010, 12:57:29 PM
Yeah, pretty much.  My thought was to change the texture IDs, S3D ID's and the paths in the S3D files.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on February 14, 2010, 12:01:34 PM
The texture replacer is an operation that I think would make sense. To make it as useful and veratile as possible, I'm considering making it taking two fields as input, the selection filter (IIDs) and the replacement IID, both accepting wildcards like "?", meaning "any value" and "#", meaning "equal to the model's IID digit", as well as literal hex values (0..F). Any proposals here?

Are there any other requests or ideas?

As for the Vista/Win7 crash issue. I have not yet got any responses from people who experience the problem and would be interested in testing it.

I have also found a bug, in the Scale operation, when scaling along the X- and Y-only axis is requested (deforming). Looks like nobody has used these.

Also there are some linguistic thngies that were not OK, both in the program and the documentation, eg "twaker" instead of "tweaker", or "nominator" instead of "numerator". All these are going to be fixed, and I would like to ask you to report even such "minor" or "not critical" things, if you find any.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Jonathan on February 14, 2010, 12:15:09 PM
Maybe a feature to change the Material to the IID of the S3D? Could be useful for things like puzzle pieces potentially.

I tried to scale a model in Win 7 and Visual Studio asked to debug which I clicked yes to and it came up with this message several times:
Unhandled exception at 0x77a64230 in SC4MDT.exe: 0xC0000005: Access violation reading location 0x000005fa.

I have no idea what it means or if its useful
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on February 14, 2010, 12:30:59 PM
Quote from: Jonathan on February 14, 2010, 12:15:09 PM
Maybe a feature to change the Material to the IID of the S3D? Could be useful for things like puzzle pieces potentially.
This should be possible, by using the # wildcard I mentioned above (I'm trying to make it flexible). For example, a replacement ID mask of 0x######## should make the material ID equal to the S3D, while a mask of 0x##7###?? should make the 3rd digit 7, leave the last two unchanged and make the rest equal to the S3D (each digit is changed separately).

Quote from: Jonathan on February 14, 2010, 12:15:09 PM
I tried to scale a model in Win 7 and Visual Studio asked to debug which I clicked yes to and it came up with this message several times:
Unhandled exception at 0x77a64230 in SC4MDT.exe: 0xC0000005: Access violation reading location 0x000005fa.

The crash problem is known, and it's caused by heap corruption. Interestingly, compiling the project with the new VC++ may solve it, but it may not as well. I believe it can be solved by using a different MFC dll, but we have to test it.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Jonathan on February 14, 2010, 01:00:37 PM
I would have thought the wildcard woulf take the numbers from the IID in the find box.

So if you do:
Find: 0x12345678
Replace: 0x#66#677#

You would get:
0x16646778

By IID of the S3D file I meant the one that is in the Dat file so like in the reader where you have a list of files. not an IID inside the S3D.

Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on February 14, 2010, 02:14:39 PM
Well, the Find and Replace items should be of the same kind, or not? So, both the Find and Replace boxes should refer to the material ID, not the S3Ds ID (these can be selected from the list anyway - you can click on the columns' headers to re-sort them if you wish). And, of course, the filtering should be performed at material level, not S3D level. There is another reason for this, many puzzle pieces have composite models, often with one group (and its material) that's common across many puzzle pieces, and another one that's different for each puzzle piece (and typically uses a material that's by convention equal to the S3D IID - or at least a part of the ID is the same). This way you can limit the changes to certain materials, selectively.

Therefore, your example does not make much sense to me, that is change something that's fixed across models to something that's different per model, ummm... It will work, but it will change only the materials that are specifically 0x12345678 and change them to model-specific values. Don't know what this would be useful to.

As I said above, both the Find and Replace masks can accept wildcards. In the Find box, the # wildcard should enable changes for the materials that are equal to S3D ID, the ? wildcard means any value, and the hex literals (0..F) means specific values, and of course these can be used in combination. I think this does make sense.

I quess you have some specific operations in mind, could you explain it in some more detail, or give an example?
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: sithlrd98 on February 14, 2010, 02:42:59 PM
Although I have been slightly inactive as of late , and am still recovering the majority of SC4 related things after 2 HDD crashes...I would love to provide any testing as I did before! If memory serves...under Win7 , I had a crash maybe 1 out of 5 or so times...and it was usually just random at that, meaning it did not matter if I was "batch"converting, ie..scale,rotate save , or rotate , scale then another function , save..or if I just did one procedure,then save. I don't know much at all about coding , but after all the testing on Vista and Win 7 , I think it may just be dumb luck and possible limitations of the .dll?

Anyway..I never did fully understand how the .dll worked so I'm not sure its possible limitations in implementing new features.

Just let me know if I can help!

Jayson
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: null45 on February 14, 2010, 09:11:20 PM
As for filling in the gaps in the s3d spec at http://www.simswiki.info/wiki.php?title=S3D (http://www.simswiki.info/wiki.php?title=S3D)  (It is the same as the one at http://old_wiki.modthesims2.com/S3D)

The MATS section seems to be:
MATS (4 bytes)

DWORD (size of mats area including header) DWORD (number of Materials groups)

(Materials group:) DWORD - Flags,  BYTE - Alpha Func,  BYTE - Depth Func,   BYTE - Source Blend Factor,  BYTE - Destination Blend Factor,  USHORT  - Material Class,  BYTE - Reserved,   BYTE - Texture count,   DWORD - Instance ID for this material,  BYTE - Wrap Mode U,  BYTE - Wrap Mode V, USHORT - Animation Rate,  USHORT Animation Mode ,  BYTE - Length of materials name including the 00 ending byte Material Name  BYTE - 00 (end materials name) 


Hope it helps.  :thumbsup:


Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Jonathan on February 15, 2010, 03:57:05 AM
What can't you do?? :D

I've added your MATs section to the wiki page here: http://www.wiki.sc4devotion.com/index.php?title=S3D/format

I think I was trying to say the same you just said, Cogeo. So just ignore my last posts and do what you were going to before I said anything :)

Jonathan
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on February 16, 2010, 02:11:53 PM
Hi again,

I have started implementation of the texture replacer function. I think it's well specified and discussed in detail. If you need any extensions, pls post.

I would also accept another request now, but I have no idea. A "merge" function maybe? Merging models can prove extremely tedious, however I'm not sure about its usufulness (I mean how many people will use it). I have seen some merged models in bridges (adding the network texture to the bridge model), but most work with bridges is already done.

As for the crash thing, I'm going to send you test versions when the texture replacer is done. If there are still problems, we can try installing an MFC dll to see what happens.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: superhands on February 16, 2010, 05:48:43 PM
maybe a merge function in which two objects become one. So (instead of the "add s3d function" which I think we are talking about) when you have two s3d objects in one model file, you have the option of grouping them so in reader they are listed as the same group.
Another idea could be a user friendly way of showing the back and front faces of the polys. Or possibly the option of modifying objects on their own such as height.

Just some ideas and Cogeo, thanks again for this wonderful tool &apls

-Dave
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Tarkus on February 17, 2010, 01:50:11 PM
cogeo, I'm just absolutely thrilled to see that you're making another version of the Model Tweaker--the initial one has proved extremely useful and you have my most sincere thanks! :thumbsup:

One possible feature request/idea that just came to mind: would it be possible to add some sort of "splicing" mechanism, perhaps just for True3D S3D files?  It could prove quite valuable for making puzzle pieces out of more complex models.

-Alex
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Jonathan on February 17, 2010, 01:51:58 PM
QuoteOne possible feature request/idea that just came to mind: would it be possible to add some sort of "splicing" mechanism, perhaps just for True3D S3D files?  It could prove quite valuable for making puzzle pieces out of more complex models.
+1 from me, that you save quite a bit of time on puzzle pieces (although I don't make puzzle pieces for complex models :))
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: nerdly_dood on February 17, 2010, 04:07:32 PM
I'm sure I could find a way to use your Model Tweaker to merge models. It would be particularly useful for me to make sure I have the various parts of my automata models aligned properly, namely headlights and flashing light effects, which the game treats as separate models. I'd quite like for you to include a Merge function, even if i won't actually save merged models.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on February 18, 2010, 10:36:28 AM
@superhands: Automating the "Add S3D" function is what I was talking about. Fusing groups into one is not possible, I'm afraid, as each group can only use one material (or I'm wrong?); if two models/groups use different materials (and they usually do), merging them is impossible then.

@Alex: Thanks for the nice comments! I don't quite understand you, is this anything different to the "merge" function we are talking about? Looked at some dictionaries and "splicing" basically means uniting/joining. Or you mean "slicing"?

@nerdly_dood: A merge (or any other), without save, function in model tweaker would make no sense, as it doesn't have a preview capability. Or I didn't understand you?
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Tarkus on February 18, 2010, 10:53:42 AM
Quote from: cogeo on February 18, 2010, 10:36:28 AM
Or you mean "slicing"?

Yes, that's what I meant.  :)  I don't know why I said "splicing". :D  Been one of those weeks.

-Alex
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on February 25, 2010, 12:03:43 PM
Hi again,

Implementation of the texture replace function is almost done, I hope it's gonna be ready wihtin the upcoming weekend. Then I'm going to give away a test/evaluation version.

I don't know if I will have the time to make the merge function too. Is this really needed now that most NAM and bridges development is already done?

As for the "slicing" function, this is going to be used in spliting a (large) model into smaller (up to 16x16m) models, for intersections, or not? Btw I have never understood why this restriction applies (couldn't one just use the "big" model in ONE of the intersection's tiles, and use nothing in the rest ones?) but I have to accept it. Still, someone should write a specification of the algorithm. I'm not sure if this can be done, and have the models working as expected. Any ideas?
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Jonathan on February 25, 2010, 12:25:00 PM
They can exceed 16mx16m but its best only to have a small overhang (liek the tiny corner of the FAR curves work better as an overhang than taking up a whole tile for a tiny triangle.

But we can't put the entire puzzle piece in one model because the terrain is not always flat.

I think the slicing function would work best in 16mx16m as it would mean only the preview model would have to be created and then we could just run that through the Model Tweaker, which cut out quite a bit of time :)

Jonathan
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: choco on March 01, 2010, 05:18:55 AM
Quote from: cogeo on February 16, 2010, 02:11:53 PM
Hi again,

I have started implementation of the texture replacer function. I think it's well specified and discussed in detail. If you need any extensions, pls post.
oh my, you just made me one happy man!  :thumbsup:

QuoteI would also accept another request now, but I have no idea. A "merge" function maybe? Merging models can prove extremely tedious, however I'm not sure about its usufulness (I mean how many people will use it). I have seen some merged models in bridges (adding the network texture to the bridge model), but most work with bridges is already done.
if you can make this happen, im sure you know how much i'll be using it.

ive completely changed my bridge construction process on bridges with complicated LODs.  basically, im constructing the BAT's in a few simple pieces, applying new IID's and material ID's manually, then merging the models....for each zoom and rotation. 

so, the texture replacer would be pivotal for me, since BAT cannot change the 5th IID digit (i do this in reader).  a batch merge function would be absolutely priceless for bridge creation.  not only new bridge creation, but modding existing maxis bridges (which typically have more than 3 models) would be soooooo much quicker.

im not sure why you feel "most work with bridges is already done.", but i assure you it is not.  i've a few more bridges to finish/finalize, then its back to the BAT for some more.  if you find the time to complete the merge function, i cannot fully explain my gratitude.   :)
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on March 14, 2010, 04:06:51 PM
Hi again,

I have made a new TEST version of Model Tweaker (V2.10-TEST). The changes include:
- Implemented the Replace Texture function
- Compiled with Visual Studio 10.

This version still uses the old S3D.DLL. However, the MFC version used by the program is newer. Chances are that using the newer MFC version will solve the crashes-under-Vista/Win7 problem (it could be a problem specific to VStudio/MFC 9). But it may as well not.

Alain (Ilive) has sent me the source code of the S3D library (special thanks!). If the crashes problem has not been solved in this version, I will attempt incorporating the code in the program, instead of using it as an external library. This should be expected to solve the problem for good and all.

Here is the download link: <Link Removed>

There is currently no installer, and the documentation has not yet been updated, but you experts, should be able to cope with this with no problem!  :)

Installation: In an existing installation of Version 2.00 (http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=2072), replace the executable (overwrite) with the one in the download link. If the (new) menu item, toolbar icon, key shortcut etc are not available/visible, try resetting your usage data (click the little down arrow on the toolbar and select Customize). If this doesn't work, try uninstalling the (old) installation first (on your Windows Taskbar select Start->Control Panel->Add or Remove Programs), install V2.00 anew, and overwrite the executable BEFORE running the program for the first time (so that no usage data will be recorded).

What to test:
- Replace materials for 1-Z/R and 20-Z/R files.
- Replace Textures dialog: the two edit-boxes use the system fixed-pitch font (instead of the dialog font), and are dynamically sized, so as to accommodate the find/replace masks (10 characters) exactly. Do they look right? Are they sized correctly (no blank space should be left, and no text wrapping should take place).

I hope you find the new features useful, and I'm awaiting your feedback.

Regards
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Jonathan on March 15, 2010, 12:50:11 AM
The replace texture feature looks exactly like what I need, it is perfect  :thumbsup:

But the program still crashes on windows 7.

Jonathan
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on March 21, 2010, 12:29:53 PM
Hi again,

I have just made a newer version of the tool (V2.20).

The updates in this version are:
- The program no longer uses S3D.DLL as a dependency. Instead, it has the code included in the program (thanks again Alain!). As a result, I would expect a different behaviour under Vista/Win7 (no crashes maybe?).
- Fixed a bug in the "Scale" operation (X-only & Y-only scaling for 20-Z/R models, ie "deforming").
- Fixed some linguistic errors (eg Nominator changed to Numerator).
- Added a Warning dialog and updated the About dialog accordingly (both state that the program was made with a pre-release version od the development tool - required by Microsoft).

Pls download and test this new version. The download link is <Link removed. Get V2.20 from the LEX (http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=2072)>

Installation: In an existing installation of Version 2.00 (http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=2072), replace the executable (overwrite) with the one in the download link. If the (new) menu item, toolbar icon, key shortcut etc are not available/visible, try resetting your usage data (click the little down arrow on the toolbar and select Customize). If this doesn't work, try uninstalling the (old) installation first (on your Windows Taskbar select Start->Control Panel->Add or Remove Programs), install V2.00 anew, and overwrite the executable BEFORE running the program for the first time (so that no usage data will be recorded). As this version no longer requires S3D.DLL, remove this file from the program's folder (it should run without it).

Hope it works now.

Regards
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on March 26, 2010, 11:47:08 AM
Sorry for bumping, but I have not yet got any feedback about operation under Vista/Win7 (and there have been quite a few downloads).

The Merge models operation is currently being implemented. As it is by far the most complex operation, it is the most likely to crash (if the general crashing problem hasn't been solved yet).
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Jonathan on March 26, 2010, 11:54:17 AM
Sorry, I looked at this on my phone coming home, then when I got home I forgot to check again and it had been marked unread.

Sorry, but it still crashes I can't give you the error message though as it keeps wanting to debug, so you'll have to get that from someone without Visual Studio installed.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on March 26, 2010, 12:02:06 PM
Jonathan, I'm talking about V2.20 (see my post above). Pls make sure that you are running this version (check the about box).

The good thing is that I have the source code now, so I can trace it more easily (to see where exactly the crashes occur).
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Jonathan on March 26, 2010, 12:33:13 PM
I just downloaded it before I posted, and I removed the S3D.dll (I tryed with the dll and without)
The Details and About Box both confirm it is 2.20

This is what I get: Unhandled exception at 0x7771dcbb in SC4MDT.exe: 0xC0000374: A heap has been corrupted.
Jonathan
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on March 27, 2010, 08:00:38 AM
Then I would like to ask you to perform two tests, to help me locate the errors:

- TEST #1: Try the "Reorient" (not Rotate) operation only (it is enabled only for 20-Z/R models). As this operation does not really change anything in the S3D files (just renumbers them), it must not crash in any case, no matter how many times you run it (better try it again and again, without closing the program in between). This will help determine if there is a more general problem in the application itself, and not in the S3D routines.

- TEST #2: You will need two files for this, one with compressed and one with uncmpressed models. As such files most probably do not exist, you will have to make them. So open a big prop-file, find an ample number of compressed S3D models, and copy them in a new datfile (and save). Then select them, right-click and select "Save decoded file" (this will uncompress and save them). In a new datfile, right-click and select "Insert File", and in the dialog select all S3D files (allows multiple selection), and save as a new file. So now you have two files, one with all-compressed and one with all-uncompressed files. Use these for testing the tweaker. This will help determine if the problem concerns specifically the compression/decompression process.

Thanks
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Jonathan on April 18, 2010, 10:04:56 AM
I doubt it is a problem with the S3D.dll (no offence) as the reader works fine with it.

I have not had time to test these but I will get to it.

Why don't you try testing it on Windows 7 yourself, I imagine you will get much more detailed information from the debugger with the source code. At least I know on Visual Studio with VB.net it highlights which line the program last executed before it terminated.

You get a 90-day trial here: http://technet.microsoft.com/en-us/evalcenter/cc442495.aspx (it's official from Microsoft for the purpose of developers testing their software)

But When the website asks "What occupation best describes you?" say Developer.

After trying out various combinations I found that these settings were the best for materials on a model:
flags-all
alpha F - greater
Depth F - less than or equal
src bl - source alpha
Dest Bl - one minus source alpha
wrap - clamb
Mag. Filter - billinear
Min. filter - billinear, no mipmapping
Alpha Threshold - either 00 or FF(256) (I can't remember)

I would like to set these options to every material in every S3D in the file but to do that now is very laborious and repetitive. So could there be an option in The tweaker to do that for me I just enter the details I want in to a window and click OK and it will go through the selected S3Ds and apply them to all the materials found in each S3D.

The other request which i think you have said no to a similar thing (but you might be able to use some of the reader's source code especially as ilive is back) is to display the S3D in a preview pane like the reader but allow the deletion/moving of vertices. So you can maniulate the model as you would in g/max.


Thanks For this great tool again
Jonathan
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on April 18, 2010, 01:53:04 PM
Jonathan, I know where the crash occurs, it's when the program releases a memory block, but there nothing wrong with that, heap corruption actually happens long before (this is when the system "understands" this). So testing under Win7 won't help. The only thing i can do is ask (and greatly involve) Alain (ilive). He's really busy for now, and I don't know if he has the time (and the will) to look into a problem which doesn't really concern him. Even if the bug is finally in the S3D library, it isn't a great problem for the reader, because the user can (manually) edit only a few files at a time, so in most cases it won't really crash. We should be thankful for offering his work and his help, and not bother him with things like these.

You didn't run the tests I asked for, this would be really helpful (and I have to add that I really expected so).

As for the extra feature you are asking for, is rather a new function, and needs to be described in more detail:
- First of, find a meaningful name  :P
- What should be optional here and what fixed?
- I haven't heard of the Alpha Threshold, and I'm not sure if the S3D library supports this. How do you edit it? Any further info?

The 2nd request is beyond the scope of the tweaker (it doesn't read FSH textures or display models) plus editing a single item is better done (or can be done) in the reader. In addition it requires many data consistency/integrity checks. I think it would be best to ask Alain for this, but I'm afraid this is beyond the reader's scope as well (this is basically the job of modelling programs).
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on June 09, 2010, 01:39:44 PM
Hi all,

I have just released a newer version of SC4 Model Tweaker (V2.20).

The updates in this version are:
- The program no longer uses S3D.DLL as a dependency. Instead, it has the code included in the program (thanks again Alain!).
- Fixed a bug in the "Scale" operation (X-only & Y-only scaling for 20-Z/R models, ie "deforming").
- Fixed some linguistic errors (eg Nominator changed to Numerator).
- Added a Warning dialog and updated the About dialog accordingly (both state that the program was made with a pre-release version od the development tool - required by Microsoft).

The changes had actually been already made by March, however the program was not available as a release version, only a test version was delivered to certain testers.

The reason I release it now is that my beta version of the development tool (MS Visual Studio 10b) was about to expire tomorrow. Now it says it will expire in 20 days, but I had to be sure. I was planning to add some more features (esp the Merge models command) and further research the crashes-under-Vista/Win7 problem, but given the lack of interest from the community, and the lack of time, I had actually stopped development.

You can download the new version from the LEX (http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=2072)
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: sdc16064 on September 22, 2010, 06:57:43 PM
I tried to use the newest version, but after I "try" to scale a model, it crashes. Can someone tell me what to avoid that or how to fix it?
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Lowkee33 on November 23, 2010, 08:17:52 AM
Getting to put this through the spin cycle today :)

I am having some trouble with the UV maps.  I have S3Ds that are using more than one FSH (multiple entries in the Material ID).  The UV maps appear to have lost the image in them and instead show a gray/grid type structure.  So far this has only happened in zoom 5, but that is the only time that there are more than one Material IDs.  Perhaps I am missing something.  All of the Material IDs have been changed correctly.  I could post a picture if it would help.

Thanks

Edit: Okay, looks like this isn't specific to Model Tweaker.  I get the same results when doing it manually in Reader.

Edit#2:  I solved the problem, and I think it is worthy to note.  If you notice in the lower right hand corner the T/G/I is using the wrong group.  When I changed the Instance of the FSH and then the Material ID the proper group was used.
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg641.imageshack.us%2Fimg641%2F7610%2Fsolved.jpg&hash=cf0d83730292578e3bcc89d8e5fb38d7ca7917ba)

I can only think that we have to be careful about using more unique Instances as well groups.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on November 26, 2010, 08:03:50 AM
The Material IDs (in the S3D files) do not contain any Type or Group info, only the Instance IDs. The FSH files are expected to have a Group ID equal to the S3Ds' Group ID, or the special value 0x1abe787d. This one is used a lot for network textures (take a look into NAM, most textures use this special Group ID).

Now how the reader displays this, I haven't digged into its code, but I guess the Type ID is fixed (0x7ab50e44 means FSH), while the Group ID should be equal to the S3D's group (0xb9eeefd4), but as such a FSH file wasn't found in the same .dat, it just displayed the default (0x1abe787d). That is, of the values displayed, only the Instance ID is actually taken from within the S3D file itself, the rest are just "calculated" values.

So if you create a copy of the S3D files, changing only the instance IDs but leaving the group ID as is, you can then modify the copied model, still using the original textures. To see an example of changes applied to a copied model, take a look at the magnified nuclear power plant model, at the end of the 2nd post (http://sc4devotion.com/forums/index.php?topic=7553.msg238266#msg238266) of this thread.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Lowkee33 on November 26, 2010, 10:39:54 AM
QuoteThis one is used a lot for network textures (take a look into NAM, most textures use this special Group ID).

Ah yes, I typed this ID quite a few times last night as I was making Chris Adams' gravel paths draggable.

QuoteSo if you create a copy of the S3D files, changing only the instance IDs but leaving the group ID as is, you can then modify the copied model, still using the original textures.

In my case, changing the groups/instances of the FSH files is necessary.  I am trying to set up three models for seasonal mayor mode flora.  For this to work the groups all have to be the same.  SC4 will basically cycle through three models in order of their instance.

The models I am working on here originally have unique groups and the same instance, so first I have to change the group, and then to avoid overwriting each other I also need to change the Instance, and then the material ID...

I did this once with no problem, but this time it happened (the group switched to 0x1abe787d).  The FSH instances where along the lines of 0x00010400.  To solve it the only thing I did was change the FSH instance to 0x00018400.

This problem only occurred when the model had two Material IDs (hence zoom 5)   
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Kergelen on February 27, 2011, 03:01:31 PM
QuoteI was planning to add some more features (esp the Merge models command) and further research the crashes-under-Vista/Win7 problem, but given the lack of interest from the community, and the lack of time, I had actually stopped development.
Hi Cogeo,

I'm trying to scale some models but the program crashes. I have Vista and I would like to know if the crash problem is solved and if the development is stopped permanently. &mmm
Thanks
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on February 28, 2011, 01:02:15 PM
Development is currently stopped indefinitely. Add to the reasons mentioned the expiration of the development tool, which is currently not available as a beta version; there is a trial version available, however it's not legal to release products made with it. I'm sorry for not being currently able to provide a solution.

There is only one workaround, operate the program under XP (find an older computer, laptop, notebook etc, and install the program there); datfiles can be transfered via a network or wireless connection, or a USB stick. You don't need to install anything else (like the MSVC runtime) as the program is fully self-contained. More importantly, you don't need to install anything SC4-related, just the Tweaker itself.

Another way is try to scale one model at a time. Scale one model first; if it crashes try again several times, usually it works. If the operation was successful, save the file. Then try the next model, etc.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Kergelen on March 01, 2011, 06:10:53 AM
Thanks for explanation Cogeo,

I tried several times but the problem is that the models are in a .dat file and I don't know how to extract each model. Is there any tool to do it?

Anyway, I will try under XP...
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on March 01, 2011, 06:51:18 AM
You don't need to extract anything, the program should open all valid DBPF files (.SC4Model, .dat etc). Operations are applied to the model(s) selected. So if you select one model, the operation (scaling in your case) will be applied to this model only.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Kergelen on March 02, 2011, 05:37:17 AM
Ok.

Yesterday I tried with another computer with XP and it works perfectly . Very fast, very easy and very useful tool.  ()stsfd()

Thanks again Cogeo.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on October 03, 2011, 11:57:34 AM
Hi all,

I'm considering releasing a newer version, at least implementing the Merge Models operation. Please post your suggestions or wishes. Also bugs and possible improvements.

I would also like to adddress the crashes problem. I need some information. Are you experiencing crashes on the 32-bit version of Win7, or on the 64-bit version only?

Thanks
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Orange_o_ on October 03, 2011, 12:21:32 PM
Hello Cogeo,

First I wanted to thank you for this wonderful tool. A new version! Great! even better if you continue to develop this software.

Personally, the only complaint I could make would be viewing the "exemplar name" open files. I'm beginning to saturate  to 0x5AD0E817, 0xDA1E90DC, 0x00030000  $%Grinno$%


Thank's  :thumbsup:
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: null45 on October 03, 2011, 09:28:26 PM
I assume you are using the VS 11 Developer Preview as your IDE.  :D
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on October 04, 2011, 02:19:45 PM
Quote from: Orange_o_ on October 03, 2011, 12:21:32 PM
Personally, the only complaint I could make would be viewing the "exemplar name" open files. I'm beginning to saturate  to 0x5AD0E817, 0xDA1E90DC, 0x00030000  $%Grinno$%
Yeah, there is needed something to help the user identify the model(s) more easily. A preview pane at the right side would be ideal, however this would require a lot of work and many changes - accessing and applying the textures - as the program currently is designed to work with S3D files only (all others aren't used, but they are kept in memory and saved unchanged when the datfile is saved). And there are other issues, eg the textures may not be in the same datfile as the models. The "exemplar name" you mention isn't easy to make either, not only the exemplar may be in a different datfile, there may be no exemplar at all, or there may be multiple exemplars referring to the same model, and these in turn require searching into the folder or the whole SC4 installation, and again, having to cope with a file type "unknown" to the tweaker (the exemplar). Another source could be the XML, however many developers remove it, and Maxis models, as well as models with 1 Z/R don't have an XML file anyway. So I think the easiest and safest way is to use the model name in the model's material. I'll try to use these ones.

Quote from: null45 on October 03, 2011, 09:28:26 PM
I assume you are using the VS 11 Developer Preview as your IDE.  :D
Not exactly, it will be VS 10 Premium, and this is a legal license, not a preview or trial one (so that stupid warning during the launch will go). The first version was made with V 2008 Beta, and the second version with V 2010 Beta. Now I'm using V 2010 Premium and this should be OK. If you open a project with a newer version of the IDE, it is "upgraded" to the new version, but this "upgrade" doesn't always go smoothly. By using V 10 again, I won't have to upgrade it once more.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Lowkee33 on October 05, 2011, 06:23:14 AM
Exciting news :)

First, I want to say that Model Tweaker is a great tool for editing models.  I think that getting the crashes to stop would be the main priority.  I would be hesitant to connect the model to an exemplar or XML, but I think that FSH may be a good idea.  Perhaps just a zoom 3 (do any models have multiple zoom 3 FSH?), we don't need a whole lot of information, just enough to know what the model is, and perhaps its orientation.

I wrote a long post, but I will try to sum it up now.  Just some ideas to throw out there. 

What I envision:

-Models have a check-box next to them to decide what gets edited.  If you are using FSH to find a model I think that you will need more than just the default Ctrl/Shift method of selecting.
-Sorting options.  Models can be sorted by size for easier finding.  You could even do Date Created (By ignoring the first digit of the Group ID.  If people edit their TGIs, then it's likely that they are already in some type of order)
-Searching.  Find models via TGI (the Reader way of "filtering" is quite powerful).
-Notepad.txt support.  Select models based on a list.

That final one might be useful only to me.  Basically, I have a Reader script that calculates Occupant Size from a zoom 0 s3d.  When I do things en-mass like this I often get snagged when some people rendered, say cars, facing south, while others have rendered them facing west.  Then it is a matter of having the script say "if the width is greater than the depth, print the TGI".  I then enter MT and re-orient based off this list.

(MT may could this option built into it: Re-orient to length-wise or width-wise.  This is probably just me though.) 

Now, my OS script no longer works after I re-orient.  My script looks at two specific Vertices and gets the OS from that.  I believe that MT changes the order of these Vertices.  I admit, I do not know how MT re-orients.  I would believe that it doesn't just change the Instance of the s3d, as it works with a model that only has one rotation.

Re-orienting X,Y,Z values is not too hard to do as a formula, but there are probably issues with U,V.  I could see a way around this:  Store the original Vertex values.  Calculate the new X,Y,Z values.  Find the original X,Y,Z that match the new X,Y,Z, and then set the U,V of the new Vertex to be the same as that old one.

Again, not sure the complexities of the S3D/FSH relationships that MT uses.  You must change the MatID when you re-orient, right?

Oh well, hope you found something interesting here :)
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on October 08, 2011, 10:40:43 AM
Quote from: Lowkee33 on October 05, 2011, 06:23:14 AM
...Perhaps just a zoom 3 (do any models have multiple zoom 3 FSH?), we don't need a whole lot of information, just enough to know what the model is, and perhaps its orientation.
Getting the data needed for the preview from either zoom 3 or zoom 5 is the same, programming-wise. The problem is that this is quite a bit of work, requiring restructuring the program internally, since as explained in my previous thread, it currently works with S3D files only.

Quote from: Lowkee33 on October 05, 2011, 06:23:14 AM
-Models have a check-box next to them to decide what gets edited.
Hmmm, I have only seen this in web, not desktop applications; and even there, it's meant to compensate for the lack of the ability to select items in some "list control" in browsers. The Shift/Control way for selecting is the standard in desktop applications (and has the advantage of allowing range selection). And then (ie if having both modes) how to determine on which selection should operations applied on? We would need dual commands, like "Resize Selected Items" and "Resize Checked Items", which may be confusing to the user. Could you suggest a desktop application that uses both modes efficiently?

Quote from: Lowkee33 on October 05, 2011, 06:23:14 AM
-Sorting options.  Models can be sorted by size for easier finding.  You could even do Date Created (By ignoring the first digit of the Group ID.  If people edit their TGIs, then it's likely that they are already in some type of order)
These are quite easy to make actually, all I need is to add the Size and Date columns. Currently the items are sortable by any of the columns, only that little arrow indicating the sorting order is not shown (I'll add this too).

Quote from: Lowkee33 on October 05, 2011, 06:23:14 AM
-Searching.  Find models via TGI (the Reader way of "filtering" is quite powerful).
Please note that the list displayed in the MT is generally much sorter than the one in the reader: only the S3D files are displayed, and the 20-Z/R ones are collapsed in a single line.

Quote from: Lowkee33 on October 05, 2011, 06:23:14 AM
-Notepad.txt support.  Select models based on a list.

That final one might be useful only to me.  Basically, I have a Reader script that calculates Occupant Size from a zoom 0 s3d.  When I do things en-mass like this I often get snagged when some people rendered, say cars, facing south, while others have rendered them facing west.  Then it is a matter of having the script say "if the width is greater than the depth, print the TGI".  I then enter MT and re-orient based off this list.
While this feature wouldn't be hard to implement, I have some doubts about its usufulness, not only regarding the effort needed to implement it vs the time it will save custom content developers, but even its efficiency regarding the user alone: one will have to write a script, test and debug it, and finally run it and paste the results into the MT! And all this only to supposedely facilitate the selection procedure! Wouldn't it be more efficient to select the items one by one? Pls take into account that the new version will be displaying the model name, which helps quite a bit.

Quote from: Lowkee33 on October 05, 2011, 06:23:14 AM
(MT may could this option built into it: Re-orient to length-wise or width-wise.  This is probably just me though.)
Well, this is a quite custom feature, isn't it? Please don't make requests for features that you are going to use only once or twice, instead make requests for features that you will be using more regularly. For this reason, I rather lean towards respectfully declining it, as well as the previous one.

Quote from: Lowkee33 on October 05, 2011, 06:23:14 AM
Now, my OS script no longer works after I re-orient.  My script looks at two specific Vertices and gets the OS from that.
I could take a look at this script. Btw what do you mean by OS?

Quote from: Lowkee33 on October 05, 2011, 06:23:14 AM
I believe that MT changes the order of these Vertices.  I admit, I do not know how MT re-orients.  I would believe that it doesn't just change the Instance of the s3d, as it works with a model that only has one rotation.
The Reorient operation only changes the instance IDs of the 20 views (S3Ds) of the model. It doesn't renumber the materials, neither changes anything inside the model, just renumbers the S3D instance IDs (in a cyclic manner), and that's why this operation doesn't suffer any crashes. For examplre, if you reorient the model 90° counter-clockwise, the 0x00030#00 model IDs will be changed to 0x00030#10. And these, will of course still be using the 0x00030#00 materials. And the opearation doesn't work for 1-Z/R models (it is disabled). More details in the MT Help (click on the help button and then click on the part of the program for which you want to display context-sensitive help) - it seems nobody is reading it.  ::)

Quote from: Lowkee33 on October 05, 2011, 06:23:14 AM
Re-orienting X,Y,Z values is not too hard to do as a formula, but there are probably issues with U,V.  I could see a way around this:  Store the original Vertex values.  Calculate the new X,Y,Z values.  Find the original X,Y,Z that match the new X,Y,Z, and then set the U,V of the new Vertex to be the same as that old one.
Again, not sure the complexities of the S3D/FSH relationships that MT uses.  You must change the MatID when you re-orient, right?
What you call "Re-orienting" here is actually the "Rotating" operation. This one indeed relocates vertices, and again, leaves the materials and UVs unchanged - why change these? This operation can be applied to 1-Z/R models only. Check my SC4 Automata as Props (http://sc4devotion.com/forums/index.php?topic=9659.0) tutorial to see an example. Actually I wished to have a real "Rotate" operation for 20-Z/R models as well, but unfortunately this is not technically possible (here is (http://sc4devotion.com/forums/index.php?topic=7553.msg238521#msg238521) the discussion). Therefore I made the Reorient operation for these models, as a rather poor substitute (effectively "rotating" the model, but in steps of 90° only).
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: bootes on October 10, 2011, 07:22:07 PM
Ver2.2
OS:win7(64Bit)

When I perform the "Move" Function,Program Crash!
Err Info is below:

问题签名:
  问题事件名称:   APPCRASH
  应用程序名:   SC4MDT.exe
  应用程序版本:   2.20.0.0
  应用程序时间戳:   4ba66d74
  故障模块名称:   StackHash_984e
  故障模块版本:   6.1.7601.17514
  故障模块时间戳:   4ce7ba58
  异常代码:   c0000374
  异常偏移:   000ce653
  OS 版本:   6.1.7601.2.1.0.256.1
  区域设置 ID:   2052
  其他信息 1:   984e
  其他信息 2:   984e9e3e6bb420cd2f30a40472c6fd3d
  其他信息 3:   13b3
  其他信息 4:   13b339f56fc5705509f32445ffca56fc

联机阅读隐私声明:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0804

如果无法获取联机隐私声明,请脱机阅读我们的隐私声明:
  C:\Windows\system32\zh-CN\erofflps.txt
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Lowkee33 on October 13, 2011, 11:03:15 AM
Quote from: cogeo on October 08, 2011, 10:40:43 AMGetting the data needed for the preview from either zoom 3 or zoom 5 is the same, programming-wise.

When I said zoom 3, I meant Instance, not the in-game zooms.  It would be easier to just display a FSH, rather than the texture placed onto the model.  If you are going to do that, I think zoom 3 would be easier than zoom 4, as many models have multiple zoom 4 FSH (though I imagine the could have multiple zoom 3 as well).  If you aren't going to display an image, don't worry about it.

Quote
Quote from: Lowkee33 on October 05, 2011, 06:23:14 AM
-Models have a check-box next to them to decide what gets edited.
Hmmm, I have only seen this in web, not desktop applications.

Now that I think about it, I haven't seen this either.  I only bring this up in the case that you have an image of the model.  If people are going through the list for models to tweak, then I think there should be a way to store selections.

Quote
Quote from: Lowkee33 on October 05, 2011, 06:23:14 AM
-Notepad.txt support.  Select models based on a list.
While this feature wouldn't be hard to implement, I have some doubts about its usufulness.

This would be very useful to me, but I already have the script needed to make such a list.

Maybe it would help the NAM team?  I don't know.  If someone has a set of models that they know they will override, then a list might help.  Then again, they would probably all be in one .dat, so they don't really have to look...

Quote
Quote from: Lowkee33 on October 05, 2011, 06:23:14 AM
Now, my OS script no longer works after I re-orient.  My script looks at two specific Vertices and gets the OS from that.
I could take a look at this script. Btw what do you mean by OS?

...

The Reorient operation only changes the instance IDs of the 20 views (S3Ds) of the model. It doesn't renumber the materials, neither changes anything inside the model, just renumbers the S3D instance IDs (in a cyclic manner), and that's why this operation doesn't suffer any crashes.

I can tell you right away this will make my script not work.  The script looks at a zoom 0 S3D, and then two specific Vertices within it.  From this I can calculate the Occupant Size (OS).  Re-ordering the instances of the S3Ds will certainly make my script not work.  The vertices in each rotation are in different orders.  This picture might help:
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg16.imageshack.us%2Fimg16%2F9446%2Fimagegwj.jpg&hash=6c8bc17690d5b5e346e591e975d89f2da6b486dc)

For this case, my script looks at point 1&2 and caclulates the Occupant Size.  Occupant Size from point 1&2 in rotation 0 works, but it does not in rotation 1.  I will just make my script a little better.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on November 12, 2011, 09:36:06 AM
Hi again,

As mentioned some time ago, a new Model TWeaker version is under development. Below is a screenshot:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg827.imageshack.us%2Fimg827%2F2846%2Fsc4mdtv230.jpg&hash=846f9bf48337c29d1c764b814c3c9e23f146474f)

New or updated features:

1. Merge Models opearation (not ready yet).
2. Added a new column in the list, displaying the Model Name. This is taken from the model's material list. It is meant to help the user identify the models more easily.
3. Added a new column, displaying the Changes performed. It shows a tooltip when hovered. As the S3D format is a "spec" (it cannot be changed), the contents of this column are of course discarded when the file is closed. That is, it displays the changes performed in the current editing session.
4. The columns in the list now display a small arrow next to the title, indicating the sorting column and order.
5. Added a command implementing selection of models, based on a list stored in the Clipboard (a request by Lowkee33). Also implemented its counterpart (copy selection-list to the Clipboard).
6. Increased the size of the most recently used files to 10 (was 5).
7. Fixed the bug with the Find/Replace masks in the Replace Textures operation, as well as a minor bug in the Reorient operation.

As for the crashes under Win7, I still don't have enough input. Does this problem occur on Win7 32-bit or Vista 32-bit as well?

Haven't worked on the crashes issue yet, and in this version the problem may be even worse, ie causing a crash as soon as you open a file, as the program now performs operations on S3D files on opening (retrieving the model name). Most probably I will have to update the S3D library, which is quite a bit of work. It may even be possible to make a 64-bit version, however this would require examining the code in the s3D library almost line-by-line, as the code may not be compatible.

At this point I can give away test-versions. Pls get the updated version from the link in this post (http://sc4devotion.com/forums/index.php?topic=7553.msg405191#msg405191).
There is currently no installer, neither documentation about the new features. Therefore you will have to copy the executable over an existing installation. You can find installation instructions here (http://sc4devotion.com/forums/index.php?topic=7553.msg316310#msg316310).

Happy testing!
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Kergelen on November 12, 2011, 12:29:36 PM
I have been tested under Windows Vista. I open the program, then open a file and after a few seconds the program crash.
However I could not follow the installation instructions because I don't know how to overwrite the application. I tried deleting SC4ModelTweaker version 2.20 but I didn't see the program in the list of "uninstall programs". Sorry as I am not expert and maybe I do something wrong. &mmm

Anyway the news columns with Model names and change are a great addition.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Lowkee33 on November 20, 2011, 10:24:59 AM
Works on an XP :)

The copy/paste to/from clipboard will certainly save me some time.  Thanks.  I am trying to get my Reader script in a shareable format.  Although it works, there are some issues with Reader.  Namely, it cant print many things at once without crashing (for me).  So, when I run my find wide models script, I have to do it in pieces that only print 10 models at a time.  This means copy/pasting to notepad and doing a bunch of Replace Alls.  There are also issues with Reader printing TGIs as integers, but for now I read RKT from prop exemplars.  :-\

Perhaps people will eventually share lists for resizing/moving certain models for better consistency. 

I like the Material ID listed.  This will be especially helpful for knowing who made what inside of a DatPack.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: FrankU on November 21, 2011, 03:21:16 AM
Hi Cogeo,

Not sure if this is the right place to ask, and also if this question is answered already... (please don't ban me).

Is it possible to give the tweaked model a different IID, so that I can use the unchanged and the changed model next to each other? Like an original version and a resized one of several ploppable terrain props (Heblems sands etc)?
My guess was that I need to change the IID's of all exemplars I see when I open the Readere, but this is new terrain for me.

Thanks,
FrankU
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on November 21, 2011, 11:41:37 AM
@FrankU: Hmmm, everything is possible to implement, the only problem is the amount of work needed. As for the Model Tweaker, it is deisgned not to create new models (copies of the originals) nor change the items' IDs. Adding such capabilities would be a fundamental update, requiring extensive changes. More details in the program's help (check the Introduction section). So the procedure is copy/paste the 20 (or 1) model files and assign them a new instance ID, by using the reader's TGI Editor tool (you can change them massively and fast). No need to copy the FSH files if you don't change the Group ID. The section Further Modding Information describes how to do this.

You have given me an idea though, ie create a new file with copied models. I'll look into adding this feature in this release if possible. But I hope you understand that the crashes issue is of higher priority though. Btw are you experiencing crashes? What OS are you running it under?
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: toja on November 22, 2011, 02:26:33 AM
This is really a great tool, thank you cogeo!  &apls

Quote from: Lowkee33 on November 20, 2011, 10:24:59 AM
Although it works, there are some issues with Reader.  Namely, it cant print many things at once without crashing (for me).  So, when I run my find wide models script, I have to do it in pieces that only print 10 models at a time.

A workaround would be to write the whole TGI list to a textfile:


-- declare an empty string variable
TGI_list = ""

-- loop through the entries and fill the variable (\n will print a newline character)
while .... do
    T, G, I = reader:entry_GetTGI(entry)
    TGI_list = TGI_list..T.." "..G.." "..I.."\n"
end

-- open a file handle and write the variable to the file
file = io.open("path/to/your/file.txt","w+")
io.output(file)
io.write(TGI_list)
io.flush()
io.close(file)
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: FrankU on November 22, 2011, 02:40:16 AM
Hi Cogeo,

I tried to use the tweaker this weekend for the first time. I had a Win7 (x64? not even sure) machine, but after the first action it crashed. I got this Win7 warning that gave me the option to run the program differently but this gave me no solution. Yesterday I did a small action during lunch hour at the office. Not even sure which OS on the network. I guess Win XP. It worked. That is all my experience with it.
What I was asking for was not to implement the option in Tweaker, althoug I won't stop you if you did.
I was thinking of editing in Reader indeed. The question could be rephrased into: What should I do in Reader to give the tweaked model its own IID. Is it enough to raise the IID values of all S3D exemplars of the original model by 1? Or is there more to it?

And then there is this question: when I use someone's model, change it and upload it this is considered fraud, isn't it?
I would like to use some models out there, but use them rescaled on lots. I want to upload these lots, but want to do it without fraud. So is there a possibility that I add some kind of information or file to my upload that makes the model rescaled like I want, but in such a way that the original model is still a dependecy? Something like a new prop exemplar: this needs the original model, althoug I can make it seasonal, floating in air and other options that are different than the original maker intended? I guess not?
Sureluy I can ask the original model maker to give permission, but what to do when he or she does not answer?

Thank you in advance,
FrankU
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Lowkee33 on November 22, 2011, 06:39:25 AM
I thought I answered this already: Link (http://sc4devotion.com/forums/index.php?topic=13978.msg402136#msg402136).  Anyway, all you have to do is clone the model's S3Ds, and change one of the first 4 digits of the instance.  It gets a little tricky, because you can't make an S3D have an Instance that is the same as a Maxis' S3D Instance.  You will have to go through Reader to find good spots.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on November 22, 2011, 12:03:21 PM
@toja: Thanks!

@Carl: Thanks for explaining.

@FrankU: Carl already replied, now let's be a little more specific.

First of all, if you are going to release modified versions of other peoples' work, you should definitely make new models and exemplars and keep the originals, because other lotmakers may be using them in their original form. And it would be best to ask the creator's permission anyway, because they may not want them modified, who knows?

Here is an example:
If the model's ID is 0x5ad0e817,0x12345678,0x00030000, you can copy the 20 0x00030##0 S3D models, paste them into another (new) datfile, and renumber them to, say, 0x00031##0. This is an IID that neither Maxis, nor any BAT-exported model will ever be using, so it's almost certainly unique (unless someone else uses the same technique and number). Renumbering is done by using the reader's TGI Editor tool, and takes just seconds, as it can renumber all models at once. Then you can modify them with the Tweaker. Making the exemplar can be a little more troublesome, as the PM may not recognize such a model (ideally you could make a copy of the XML file too, and set the correct/updated dimensions in there, but this is just additional work). Better create the exemplar using the original model and then modify it in the reader - you need to set the new TGI IDs in the RKT1 property, as well as the new Occupant Size (if you have resized it).

Now if you are going to release these, you should only include the updated S3D models and the new exemplars - not any FSH files. You should also list the original prop-pack as a dependency (you need it because the FSHs are there).

Hope this helps.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Lowkee33 on November 22, 2011, 02:02:15 PM
Quote from: cogeo on November 22, 2011, 12:03:21 PM
If the model's ID is 0x5ad0e817,0x12345678,0x00030000, you can copy the 20 0x00030##0 S3D models, paste them into another (new) datfile, and renumber them to, say, 0x00031##0.

I am a little weary of changing the 5th digit (0x00031##0).  I believe that models that are rendered as foundations are given the fifth digit as a 1, perhaps it "turns off" shadows.  If this works, then don't mind me.  I feel better changing the first four digits.  I am pretty sure that Maxis left the 0xF8###### empty, and there is also a lot of space in the 0x6####### area. 
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: FrankU on November 23, 2011, 03:06:35 AM
@ Cogeo and Carl,

Thanks a lot for your info.
So this means that I could indeed make my own edited models while the original still is necessary as a dependency? That might give me the opportunity to use them in uploads. Is there someone who can tell me what the bottomline is here? I'd like to be polite, of course.
The problem is: the makers of some of the models I am thinking of are not active anymore for quite some time now (Vanderaap and Haarlemmergold), so I don't know if they ever are going to read my PM's. And as copyrights last 50 or 70 years, I can't wait for that, because I will be dead by then....

And sorry that I overlooked your answer Carl, I didn't realize that this was the same question... Tweaking models is completely new to me.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on November 27, 2011, 09:02:21 AM
Hi again,

I have worked a little with the crashing-under-Win7 issue. I made some easy/minimal changes, updating the header files, but not really checking the code of the S3D library in depth. I doubt if this will solve the problem, but who knows? If not, I will have to finally debug it and carry-out the necessary revisions.

Please download the updated version (V2.31-TEST) and report your findings. Testing should be easy, open a large prop-pack, select all models and apply a move or resize operations (then exit without saving).
You can download the updated version here (http://www.fileden.com/files/2009/4/13/2402099/SC4%20Model%20Tweaker%20V2.31_TEST.zip).

Thanks in advance
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Badsim on December 07, 2011, 10:25:00 AM
I never cease to speak about that great tool SC4MT is , in my MD . The simple reason is that it has became absolutely necessary to my work , just like ILiveReader ... I enjoy even more SC4MTv2 and its new features , and , having noticed nothing wrong  with it ,( running this old dear XP ... ) so I have nothing to report here , except .... thank you . A lot . ;)

Cédric.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on December 09, 2011, 01:24:27 PM
Hi again,

@Cédric: Thank you for the nice comments! I visit your MD often (although I haven't commented yet ()sad()). You are doing an excellent job there, achieving a very realistic look! :thumbsup: Hope the new version of the Model Tweaker will be easier to use.

I have just uploaded a new TEST Version of the tool (V2.35-TEST). Here is (http://www.fileden.com/files/2009/4/13/2402099/SC4%20Model%20Tweaker%20V2.35_TEST.zip) the download link. Changes in this version:
- Fixed some issues with the use of the S3D library. As a result, the crashes-under-Win7 must have been solved. Win 7 users, please download and test.
- Finished implementation of the Merge Models operation. This one appends a model to the ones selected in the main list. A 20-Z/R model may be appended to 20-Z/R models only, while a 1-Z/R model may be appended to both 1-Z/R and 20-Z/R models.

The Merge Models command could prove useful in the following cases:
- Network Models (for draggable networks and puzzle pieces). Often developers need to merge models, eg monorail/elevated track and pylons or support structures. I'm even considering the feasibility of a true catenary (or near-catenary) overhead wire for rails, implemented as a 1-Z/R model (which wouldn't be that hard) and used as a network model, which really follow the variations of the terrain elevation (in contrast, props are either displayed upright, or sloped, according to the Orient To Slope property).
- Bridges: Many players would have noticed that the "network" (road or rail) displayed on bridges usually looks badly distorted (pixelated, blurred, bumpy etc) because of the distortions caused by the BAT renderer. Some developers have solved this problem by employing a simple planar (flat) model textured with the very same texture as the network (or a properly modified version, eg rail without those wooden sleepers) and placed just on top of the road or track bed. Placing such a model on top of all models of a bridge (End, Repeat, Support - and possibly more) is possible, but it's very labourious too (each model has 20 Z/R views). Even worse, if something is changed in the bridge models (eg a texture improvement) the procedure must be repeated. Now, with the Merge Models command, the network model can be attached to the bridge models within seconds - it as well rotates the 1-Z/R model, as needed for the different model rotated views. Even existing bridges could be improved, by adding the flat model on top of the original models - the flat model might need to be raised by 0.2m or so, before appending.

Please test the new version and report your findings. Please also post any ideas or possible improvements or requests. If everything is OK I'm gonna finish the documentation and release it as Version 3.00 (there are quite a few changes and improvements, to qualify as a new major version).

Hope you like it!
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Kergelen on December 11, 2011, 01:34:23 PM
I just tested the version 2:35 and I have not had any problems. :)

On the other hand, I had think many times that would be very useful the possibility to rotate models 45 degrees. It could easily make many diagonal buildings.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Tarkus on December 11, 2011, 01:48:26 PM
cogeo, my sincere thanks for your efforts here!  I've been an avid user of Model Tweaker for awhile now, and as a transit modder, Merge Models is going to make things so much easier.  I've just downloaded it and started giving it a whirl . . . so far, so good. :thumbsup:  (I happen to be on Win7, too.)

-Alex
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Lowkee33 on December 22, 2011, 12:41:05 PM
Merge Model looks very interesting, and also to need some prep work by the user.  Would merged models cast shadows on each other?

Title: Re: SC4 Model Tweaker Development/Support thread
Post by: NCGAIO on April 06, 2012, 11:42:28 AM
Does anyone know what happened to the SC4 model tweaker? ... Cogeo blocked and removed the file download links of the topic.!
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: FrankU on April 07, 2012, 04:12:25 AM
Hi Ncgaio,

As far as I have see you can download the latest version of the Tweaker form the LEX. I was looking for the alst version some weeks ago and found the one on the LEX being the same as the latest I had found on this thread.

And to Cogeo: I don't know if you know already, but with my Win7,x64,SP1 system I can rotate models without problem, but not scale. Scaling makes the program crash.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: NCGAIO on April 07, 2012, 04:32:41 AM
Quote from: FrankU on April 07, 2012, 04:12:25 AM
Hi Ncgaio,

As far as I have see you can download the latest version of the Tweaker form the LEX. I was looking for the alst version some weeks ago and found the one on the LEX being the same as the latest I had found on this thread.


Unfortunately no longer available ... I do not know if it was due to problems with Win7 but it seems that this magnificent work Cogeo gone!
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on April 07, 2012, 10:26:02 AM
Quote from: NCGAIO on April 07, 2012, 04:32:41 AM
Unfortunately no longer available ... I do not know if it was due to problems with Win7 but it seems that this magnificent work Cogeo gone!
Model Tweaker hasn't gone, instead the new version is about to be released "officially" soon, maybe tomorrow (it's not Easter here, and I hope I will find some time to finish it). I have disabled downloads from the LEX after I got a report that the download contained only the executable, and not the full installer with the documentation. Apparently uploaded a wrong file. You understand the frustration, it was like that for nearly 2 years!

Quote from: FrankU on April 07, 2012, 04:12:25 AM
I don't know if you know already, but with my Win7,x64,SP1 system I can rotate models without problem, but not scale. Scaling makes the program crash.
Quite surprised to hear this, as I was thinking that the problem was solved. Are you sure you are using the last version, ie V2.35-TEST? Pls open the About box. If yes, do you have this problem with all models, or with one specific model only? If so please tell which model this is (or send it to me) to take a look.

Quote from: Kergelen on December 11, 2011, 01:34:23 PM
On the other hand, I had think many times that would be very useful the possibility to rotate models 45 degrees. It could easily make many diagonal buildings.
I know, it would be nice (make diagonal versions out of orthogonal models), but unfortunately this is not possible because for 20-Z/R models each view corresponds to one of the four rotations only, the back faces are missing and the textures are specific to the viewing angle. Here is (http://sc4devotion.com/forums/index.php?topic=7553.msg238521#msg238521) an old discussion on this. Only 1-Z/R models, eg automata, can be freely rotated, and actually not all of them, only those which are designed as such. However, for models with relatively simple LODs and for small angles, it may be possible to perform a rotation with fairly acceptable results. You will have to fool the program to allow this. Here is how:
- Open the model in the reader and change the 1st model IID from say 0x00030000 to 0x00030001. This way the Tweaker won't find 20 properly numbered models and won't group them as a single 20-Z/R model.
- Open the model in the Tweaker. It will display it as 20 separate 1-Z/R models. You can select them all and rotate them by the desired angle (the Rotate command, as opposed to Reorient is enabled for 1-Z/R models).
- Then open the model in the reader again and change the ID of the 1st model back to 0x00030000.




The new version will be the same as V2.35-TEST (the one dl-ed from the link in my previous post), only it will now be named V3.00, and of course won't have that warning at launch (it has quite a few new features, and is considered stable, as it was sufficiently tested).

It may be possible to add some new features before releasing it. If you have any new requests please post them now, as most probably there are not going to be any future releases (SC4 is dying anyway).
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: NCGAIO on April 07, 2012, 12:18:47 PM
For those who followed the development is gratifying to know that this tool is still active dear. About the announced death of SC4 ... though it seems near I believe it will take a couple of years to bor that this will happen. And certainly not by the launch of the new ... (Despite what appears in the advertising market will not be possible to do anything like what was done here).

All information is on the increase of traffic in the best sites. Perhaps knowing that the new players also stay with the two for the best of both worlds, a good simulation in the new game and the excellent art portion can be generated by ten years of moding SC4.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: FrankU on April 16, 2012, 06:33:15 AM
Quote from: cogeo on April 07, 2012, 10:26:02 AM
[
Quote from: FrankU on April 07, 2012, 04:12:25 AM
I don't know if you know already, but with my Win7,x64,SP1 system I can rotate models without problem, but not scale. Scaling makes the program crash.
Quite surprised to hear this, as I was thinking that the problem was solved. Are you sure you are using the last version, ie V2.35-TEST? Pls open the About box. If yes, do you have this problem with all models, or with one specific model only? If so please tell which model this is (or send it to me) to take a look.

Hi Cogeo,

I took a look. It is version 2.30 that I used. I'll try 2.35 before I post again. Sorry to have upset you.

And is SC4 indeed dying? I hope not!
It's not the oldest living game yet. I sometimes play Quake, the original form 1996. Last year I found out that lots of people are still making new levels for this game! Maybe we can try to outage it?
Title: SC4 Model Tweaker V3.00 Almost Ready
Post by: cogeo on May 03, 2012, 01:46:06 PM
Hi folks,

I would like to let you know that development of the new version of the tool and its (updated) documentation is completed. The program is the same as V2.35 (test), the one that was made available for testing in this thread some little time ago, only the warning on launch has been removed. Making the installer and releasing it is just a few minutes work. However before doing so I would like to have it a little more tested, and this time I'm talking about the documentation. I did proof-read it - and found several points to correct - but I think it would be better to have it checked by some more members, preferably native English speakers.

If you are interested, send me a PM and you will get the new version of the tool + documentation, along with its source (it's in html). You can make your revisions and send the revised file(s) back to me, or tell me your suggestions and I will carry out the updates. You can make suggestions about both the content (eg inaccuracies, ommisions, needed clarifications etc) and linguistic mistakes or possible improvements (eg make a phrase sounding more "natural").

Thank you in advance
Title: Uninstalling an older Version of SC4 Model Tweaker
Post by: cogeo on June 16, 2012, 02:38:10 AM
If you had previously installed an older version of SC4 Model Tweaker, you have to uninstall it before installing V3.00. Please uninstall it as described below:

A) If you had installed the older version using an installer: This is easy, simply uninstall the application using the standard Windows setup services. From your Windows Taskbar select Control Panel->Add or Remove Programs (in Win7: Control Panel->Programs->Unintall a Program), and in the list displayed find SC4 Model Tweaker and click Remove (or Uninstall).

B) If you had installed the older version manually (incl test versions): Delete all Tweaker's files and shortcuts, and then open the Registry Editor (in the Taskbar select Run, and type-in regedit), go to HKEY_CURRENT_USER\Software\Cogeo\SC4 Model Tweaker, and delete the whole "SC4 Model Tweaker" key (tree's branch).
Title: SC4 Model Tweaker Version 3.00 Released
Post by: cogeo on June 16, 2012, 02:48:56 AM
Hi all,

The new version of SC4 Model Tweaker (V3.00) is now available for download on the LEX (http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=2072). Here is an image of the new program.

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg834.imageshack.us%2Fimg834%2F6498%2Fsc4mdt1.jpg&hash=fb18996b59203f516037a56a7390d5c94e7a10cd)

It contains a number of new features, upgrades and fixes. These include:

- Upgraded User Interface: Added two new columns in the list, Model Name (making it easier to identify models) and Changes (easier tracking changes - in the current editing session only). Also the list is now sortable by any column; a small arrow indicating the sorting column and order is displayed next (WIn XP) or above (Win 7) the column's title.
- Added the Merge Models command. Useful, among others, for network models and bridges.
- Fixed the crashes-under-Vista/Win7 issue.
- A few minor bug fixes.
- Updated documentation (special thanks to woodb3kmaster for reviewing/correcting the help files).


Installation

The application comes in an msi installer form, installing the program, the documentation and creating the necessary program menus. Before installing the new version, you have to completely uninstall any older version, whether it was installed using an installer or manually. Please refer to the previous post (http://sc4devotion.com/forums/index.php?topic=7553.msg426168#msg426168) in this thread, for instuctions on how to uninstall an older version.


Suggested User Interface settings

SC4 Model Tweaker features a standardised yet customisable user interface, so as to make the application more familiar and comfortable to as many users as possible. However I would suggest that you set the UI options as shown below. Right-click on the Toolbar and select Customize.

Then go to the "Toolbars" tab, select the "Standard" toolbar and check the "Show text labels" check-box. This makes it easier to identify the toolbar buttons.

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg560.imageshack.us%2Fimg560%2F9320%2Fsc4mdt2.jpg&hash=952421a85ec56f7aaa7123c57c4b4f5dab1dbd99)

Then go to the "Options" tab and uncheck the "Menus show recently used commands first". This is a nice feature offered by Microsoft as a default, but it's mostly useful for long menus. However the Tweaker's menus are short, and in this case it proves rather counter-productive, as it hides most of the menu commands, requiring the user to expand the hidden part, thus causing delays. Therefore it is recommended that you disable it.

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg406.imageshack.us%2Fimg406%2F5560%2Fsc4mdt3.jpg&hash=aba0ce8c915dda3cc29cfcc5c567e52f7ac2f05d)


Using the Help System

SC4 Model Tweaker, although quite self-explaining and easy to use, includes detailed documentation, in online and context-sensitive help. It can be invoked in two ways:

1. Select the Help->Help Topics menu; this will open the documentation's Help Index page.
2. As shown in the pic below, click the Help button on the Toolbar. The cursor will change to pointer+questionmark. Then click on any UI item (window, button, menu item etc) even if it is disabled.

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg140.imageshack.us%2Fimg140%2F1743%2Fsc4mdt4.jpg&hash=f741053c72b90d9a3217189cfe726189aca58ed0)

This will display its associated help topic.

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg526.imageshack.us%2Fimg526%2F4103%2Fsc4mdt5.jpg&hash=ca91f4c1577f3dbcf4c16ecb5d6c908f4b2930e6)


Please report any problems in this thread. Also feel free to ask for help (on how to use its features) if you have troubles.

Hope you enjoy the new version!
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: FrankU on June 16, 2012, 04:14:30 AM
Wow, this looks great!
When and if I have time I will use it.

Thanks for the effort you put into this.  :thumbsup:
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: NCGAIO on June 16, 2012, 09:34:24 AM
 &apls Again, again, again ..... Very good to know that we are still here. And from what I've seen after E3 I think we will still stay for a long time with SC4. Remains now hope to achieve an SDK or at least to release compilations of DLLs.


Fantastic work ... congratulations.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: knapp on July 03, 2012, 12:25:32 PM
Just tried the new version because the old one crashed under win7 and it worked.
Great!!! Thanks very much for your work and the time you sacrify for the SC4-Community  :thumbsup:
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: jmyers2043 on July 21, 2012, 08:08:18 PM
Hi Cogeo

I've been downloading some things from other sites recently. Boy, what a surprise. There is some careless modeling and modding. I downloaded this program today and put it to good use. Thank you for this great tool !!!

- Jim


Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Dublin on August 27, 2013, 09:07:46 AM
Awesome tool with great improvements, glad I found it again. Quick question, I've been having great fun getting various models tweaked to the proper size and one thing that I would like to do is this; there are a few items that look great re-sized and great in their original size, is there a way to have both? Thanks
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: FrankU on August 28, 2013, 01:12:21 AM
Yes, sure there is. It was my own question some time ago and it was answered in this same thread in reply #170. You could read the whole discussion, beginning with my question in reply# 168, but to make it easy I quote the most important part

Quote from: cogeo on November 22, 2011, 12:03:21 PM
@FrankU: Carl already replied, now let's be a little more specific.

First of all, if you are going to release modified versions of other peoples' work, you should definitely make new models and exemplars and keep the originals, because other lotmakers may be using them in their original form. And it would be best to ask the creator's permission anyway, because they may not want them modified, who knows?

Here is an example:
If the model's ID is 0x5ad0e817,0x12345678,0x00030000, you can copy the 20 0x00030##0 S3D models, paste them into another (new) datfile, and renumber them to, say, 0x00031##0. This is an IID that neither Maxis, nor any BAT-exported model will ever be using, so it's almost certainly unique (unless someone else uses the same technique and number). Renumbering is done by using the reader's TGI Editor tool, and takes just seconds, as it can renumber all models at once. Then you can modify them with the Tweaker. Making the exemplar can be a little more troublesome, as the PM may not recognize such a model (ideally you could make a copy of the XML file too, and set the correct/updated dimensions in there, but this is just additional work). Better create the exemplar using the original model and then modify it in the reader - you need to set the new TGI IDs in the RKT1 property, as well as the new Occupant Size (if you have resized it).

Now if you are going to release these, you should only include the updated S3D models and the new exemplars - not any FSH files. You should also list the original prop-pack as a dependency (you need it because the FSHs are there).

Hope this helps.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: Dublin on August 28, 2013, 12:02:49 PM
Thanks so much, kinda skipped thru he posts and missed that one. :thumbsup:
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: NCGAIO on August 29, 2013, 07:00:44 AM
You can read this  LINK (http://sc4devotion.com/forums/index.php?topic=15598.msg451861#msg451861) as is the identification of the model to TGI.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: City Planner on September 06, 2013, 10:42:04 AM
I love this tool, its so essential to the game in making a uniform size for everything.  There is one thing thought... I am getting a small error when uploading Mike Seith's Car props.  It says that the DIR is outdated and I need to use the Reader and than shuts down.  I looked in the reader but I see no way to scale the props.  Is there a way around outdated (DIR) message?  Thanks in advance
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: NCGAIO on September 07, 2013, 05:42:46 AM
Open the dat in Rader and press right-click on the files page  then  on the new frame click "reindex"  and then rebuild  "directory"  after  just save.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on September 07, 2013, 08:46:47 AM
Are you sure you are using the new version (V3.00)? Pls check the About box.

If so, please send me the file that causes you troubles to take a look. My email is public.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: City Planner on September 07, 2013, 10:51:21 AM
Thank you for your reply.  I am using v 3.00 .  I am trying to upload Mike Seiths 'ms family eurocar props'.  The website is not allowing me access to send an email to you Cogeo but the link that I am talking about with the files are here- http://community.simtropolis.com/files/file/14400-european-cars-automata-and-family-props-new-instances/

NCGAIO, if I reindex and rebuild the Directory will it mess up the ms props that are already in-game?
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: NCGAIO on September 07, 2013, 12:21:23 PM
Quote from: City Planner on September 07, 2013, 10:51:21 AM

NCGAIO, if I reindex and rebuild the Directory will it mess up the ms props that are already in-game?


No.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on September 07, 2013, 12:24:09 PM
OK, checked mikeseith's files (it's easy, you can drag-and-drop them on Model Tweaker all at once, not having to open them one by one), and all but "renault dealer truck.dat", indeed cannot be opened in the Tweaker.

Model Tweaker should be able to open all valid dafiles. The error-messages you are getting are because of some sanity checks performed by the application on loading a datfile. Model Tweaker refuses to open datfiles that don't pass these sanity checks. It won't attempt to fix them, because it's not a general-purpose modding tool. Erroneous datfiles should be fixed with the Reader first. And this is what the message actually says, ie "Please fix this archive using the Reader", rather than "Use the Reader to modify your models".

The sanity check that causes the problems with mikeseith's cars is the DIR file (it must contain the same number of entries as the compressed files in the archive - if not the message is displayed). Mikeseith's plugins contain TWO DIR files though, which is wrong. Most probably he developed his plugins separately and finally merged them, in a wrong way though, ie copying ALL files (incl the DIR one). Tweaker doesn't make a check for this condition (duh, I may put this one too in some future version, but how could I have guessed?). Instead it just happened to find the erroneous DIR file, so you got the message.

The solution is quite simple (though a little tedious, for so many files): Open the file in the reader, delete all duplicate DIR file(s), so that there's only one left (it doesn't matter which one, because the Reader rebuilds the DIR on saving), and save. I would say use DatPacker to merge all these datfiles into one (it will leave only one DIR file), but this wouldn't be very much helpful, because mikeseith's models have names like "1E010400_$$$planter-concrete3_Flora2x2x5_Z5S", yes! Talking about the automata, props are named differently, not in a very helpful way either though. But then there's another problem: how are you going to resize them? They won't be fitting into parking lots nicely.

Hope this helps.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: City Planner on September 07, 2013, 04:48:41 PM
Thank you guys for the quick support.  This is a great tool for SC4 and without this tool a lot props would be useless considering that different props are scaled differently.  Kudos to you guys for the great work..   &apls
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: simangel on October 07, 2013, 08:04:58 PM
Hi I am wondering if anyone can help, I recently downloaded this and am trying to resize a building (RSL Executive Tower by SimGoober).
However when I try to resize it following the tutorial (I open the building model in the program, right click choose resize and I chose the 0.75 just to test it out), but nothing happens
no sudden growth spurt of the building, the building only has a LOT file and a MODEL file what am I doing wrong? or does it not work for MODEL files?.

Big thanks for any help.
Simangel
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: APSMS on October 07, 2013, 08:25:28 PM
I am not sure of whether the program works on MODEL files. However, your question is strange. Why would the building suddenly start growing everywhere? Also, I am pretty sure that the ModelTweaker default is to make a new instance of the model, rather than to replace the existing version.

Also, the program doesn't modify LOT size, which is something that must be done in the LotEditor. Usually spamming of building growth is something that results from improperly modded buildings; these properties are tied to the LOT, not the building model. An inappropriately high capacity building on a very small lot will, under proper circumstances, grow faster and easier than larger, properly modded buildings that take up more tile space.

What exactly do you mean by growth spurt?
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: simangel on October 07, 2013, 10:12:41 PM
Sorry by growth spurt I meant that the building had not been made bigger like it should have, but had remained it's original size, I thought this program might work because someone over at Simtropolis recommended it to me.

Specifically what I am trying to do is increase the size of a building (RSL Executive Tower by Simgoober), it is one of my favorites however it is WOEFULLY under scaled, so I was hoping to use this program to rescale the building.   
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: simangel on October 07, 2013, 10:18:48 PM
Essentially what I am trying to do is what was done with the Maxis nuclear power plant model on page one of this thread.
Title: Re: SC4 Model Tweaker Development/Support thread
Post by: cogeo on October 08, 2013, 12:16:38 PM
Model Tweaker works on S3D models only (typically contained in .SC4Model and .dat files). It doesn't affect any other file type (eg exemplars, textures etc) in any way - these are not shown in the list displayed, but are held in memory and saved unchanged in the datfile. Also Model Tweaker does not add or delete items in the datfiles (eg create new instances of the models being edited) - only modifies them - neither it changes their TGI IDs. That is, S3D models are edited "in place". And as models are not stored in the savegame (city files), only "referenced", changes to the models should be immediately visible ingame, even if the lots they are used in were grown or plopped before the tweaking took place.

To modify (resize, move etc) a model or models, select (highlight) them in the Tweaker and select the desired editing command from the main menu, the toolbar or the context menu (right-click); the changes are applied only to the models (S3D files) selected.

So, resizing Simgoober's model by a factror of 0.75 should result in a model that it's 3/4 the size of the original (make a backup of the original first, and make sure that you are working on a copy of the original, as changes are of course cumulative). If you don't see the changes ingame, this may mean that either the changes did not actually take place (eg accidentally resized another model instead) or there is another copy of the original model in your installation, which overrides the modified one.

To make Simgoober's model larger, you have to resize it by a factor greater than 1.00, but this is not enough. You also need to adjust the Occupant Size property in the building exemplar (so it equals the dimensions of the enlarged model) using the reader of course, and update the lots it is used in (eg reposition the building or the props as needed, or even enlarge the lot if necessary). If you wish to upload your work, you should instead copy the model (only), use new IDs for the copied model (as described in the tutorial), make new building or prop exemplars (using a different IID) and make new lots; you still need to list the original model as a dependency, as the model's textures (FSH files) are contained in there.

As for how easily the lot grows, this relates to the properties in the building and lot exemplars, and not the model size.

Hope this helps.