Modding map.swf

Post » Tue Nov 20, 2012 3:32 am

Does anyone have any experiance in modding the map.swf? It is located in the interface.bsa.

I am trying to do a number of things, like remove some map markers, change the size of some map markers, etc..

Reading the guide here http://skyrim.nexusmods.com/mods/1800 now.



A problem I am having is when I open my map.swf file in swix, and than save back to swf, this is what it does in-game to every icon I hover over:

http://img255.imageshack.us/img255/691/2012102800001.jpg


This is when I don't even make changes to the scripts. Just open with swix, and save out as swf.
User avatar
Dan Endacott
 
Posts: 3419
Joined: Fri Jul 06, 2007 9:12 am

Post » Tue Nov 20, 2012 10:58 am

Does anyone have any experiance in modding the map.swf? It is located in the interface.bsa.

I am trying to do a number of things, like remove some map markers, change the size of some map markers, etc..

Reading the guide here http://skyrim.nexusmods.com/mods/1800 now.



A problem I am having is when I open my map.swf file in swix, and than save back to swf, this is what it does in-game to every icon I hover over:

http://img255.imageshack.us/img255/691/2012102800001.jpg


This is when I don't even make changes to the scripts. Just open with swix, and save out as swf.

I've never used that program, but the skyui team has decompiled atll of the interface files to FLA, and uploaded them here:
https://github.com/Mardoxx/skyrimui

You'd probably get better results using those, if you have flash of course...
User avatar
Nichola Haynes
 
Posts: 3457
Joined: Tue Aug 01, 2006 4:54 pm

Post » Tue Nov 20, 2012 5:04 am

Yes, I do have flash. Do I then also use flash to compile them back to swf?
User avatar
David Chambers
 
Posts: 3333
Joined: Fri May 18, 2007 4:30 am

Post » Tue Nov 20, 2012 12:46 am

After making adjustments to the sprites and all of that as you see fit, then use this app to recompile.

http://www.swixkit.com/

I've only just begin editing the interface for my project.
There is a very steep learning curve with all of this.

Good luck!
User avatar
Damien Mulvenna
 
Posts: 3498
Joined: Wed Jun 27, 2007 3:33 pm

Post » Tue Nov 20, 2012 12:51 am

What do I save it out as in Flash after I make my changes, fla?
User avatar
cosmo valerga
 
Posts: 3477
Joined: Sat Oct 13, 2007 10:21 am

Post » Tue Nov 20, 2012 10:58 am

What do I save it out as in Flash after I make my changes, fla?

No, you export the file as a swf and put that in the game folder.

You should also have opened it from the directory containing all of the other decompiled files... the stuff for how it interacts with the game is not in each swf of course... it's external class files, and when it's compiled to swf they are included in it.
User avatar
louise tagg
 
Posts: 3394
Joined: Sun Aug 06, 2006 8:32 am

Post » Tue Nov 20, 2012 9:23 am

Okay, I will try that now. Thanks for the help all, I'll report back soon

Edit: Also, am using Adobe Flash CS5, if that matters. Also, I read somewhere that I needed a scaleform sdk or else I will get errors when recompiling the fla into swf. Is this true? Also, are their preferred settings when compiling back into swf from fla?
User avatar
Emma Copeland
 
Posts: 3383
Joined: Sat Jul 01, 2006 12:37 am

Post » Tue Nov 20, 2012 2:04 am

Yes. Just yes.


This was the solution to all of my problems.

"You should also have opened it from the directory containing all of the other decompiled files... the stuff for how it interacts with the game is not in each swf of course... it's external class files, and when it's compiled to swf they are included in it."

I am extremely grateful to all of you, now I can start modding the map.swf

A few last questions,

Is there anyway to decompile my own map.swf, instead of using skyui's?

Does anyone know the location of the scripts (in the skyui interface decompiled files) that effect where the map markers are placed on the world map? Is it in the map.fla or an action script file?
User avatar
Haley Cooper
 
Posts: 3490
Joined: Wed Jun 14, 2006 11:30 am

Post » Tue Nov 20, 2012 2:11 am

Is there anyway to decompile my own map.swf, instead of using skyui's?

Does anyone know the location of the scripts (in the skyui interface decompiled files) that effect where the map markers are placed on the world map? Is it in the map.fla or an action script file?

Each menu fla has its own scripts where most things are done, so yes, the functions you are looking for are probably in map/Map/mapmenu.as. They are all in folders with the same name as their FLA files. I take it that you are not too familiar with flash, or at least actionscript... I'm not an expert but I will try to explain how it works: The scripts are attached to library objects in flash, basically making them new classes that extend the default ones like movieclip. An instance of the script is created for each library object instance added to the stage, or it can be created programmatically in the frame actions, which is what they do with the wolrd map. The frame actions just run automatically when the frame is played. The name of the instance to be referred to in the scripts is either set as the variable name if created programmatically, or set as the "instance name" in the properties window in flash with the stage object selected.

Actually, any object added to the stage can can be given an instance name and you can manipulate it like you would if you just created a new one programmatically (if it does not have its own script, it's just an instance of that object type/class, most things would be movieclip). Adding them to the stage is just an "easy" way of doing it so it has a position and scale and such already, and so it can be used in timeline animation. So you'll notice that there are a lot of definitions in the script like "var BottomBar: MovieClip;", which are not instantiated in the script. Instead of being confused, look at where they are assigned in the script. This one for example is: "BottomBar = _root.Bottom;" - which you can find on the stage. Also, if you look at the actions in the first frame, you can see that in this case only "MapMenu" is created programmatically, the others are added to the stage. If you open the MapMenu.as file, you will find a lot of functions, like "CreateMarkers()", "RefreshMarkers()", " SetSelectedMarker()", etc. I think these would be what you're looking for. I think the whole thing is badly designed, but it's probably partly because it's done in actionscript 2, and partly because flash I think is set up to just make it as easy as possible to make visual things happen without knowing much about actionscript... that is off-topic though so nevermind.

The files are not very well organized and not commented at all so it will probably take some time to undestand exactly how each function works, but it's decompiled so it's all you can do. I have not examined the map scripts so I can't help you much with that... but hopefully this helps anyway.

You can possibly decompile your own swf, but I've never really done that so I don't know of any swf decompilers or what kind of work you have to do after that to make it usable. Maybe ask someone from skyui? From what I saw

The files, by the way, are the "vanilla" ui... the skyui source files are in a separate project, in case you didn't notice.
User avatar
Far'ed K.G.h.m
 
Posts: 3464
Joined: Sat Jul 14, 2007 11:03 pm

Post » Tue Nov 20, 2012 11:04 am

Yeah, I just meant the sky ui decompiled vanilla files.

Anyway, thanks for the information, it is much appreciated.


Currently, I am trying to figure out how to change the size of the icons that are shown on the map in game. I'm not sure if I just resize the art layers, or their is a percentage in the as scripts somewhere that determines how big they are, depending on how far you are scrolled in or out.
User avatar
Zach Hunter
 
Posts: 3444
Joined: Wed Aug 08, 2007 3:26 pm

Post » Tue Nov 20, 2012 12:16 am

Yeah, I just meant the sky ui decompiled vanilla files.

Anyway, thanks for the information, it is much appreciated.

Currently, I am trying to figure out how to change the size of the icons that are shown on the map in game. I'm not sure if I just resize the art layers, or their is a percentage in the as scripts somewhere that determines how big they are, depending on how far you are scrolled in or out.

They do not change size depending on how far you zoom in, that is an optical illusion.

Try adding something like:
_xscale = 200;
_yscale = 200;

http://help.adobe.com/en_US/as2/reference/flashlite/WS5b3ccc516d4fbf351e63e3d118ccf9c47f-7c77.html

An easy place to put it would be in the constructor function in mapmarker.as (the function mapmarker() one.)

By the way, that line which says "Scaling the local coordinate system affects the _x and _y property settings, which are defined in whole pixels." is incorrect, the _x and _y properties are not affected at all, at least the last time I tested. Unless they mean ONLY for the object's children, which may be true.

They are created prorgammatically, so if you instead decide to scale the art, you have to scale them from the library, as they are not placed on the stage. That is just more work than just editing the script.
User avatar
Elea Rossi
 
Posts: 3554
Joined: Tue Mar 27, 2007 1:39 am

Post » Tue Nov 20, 2012 2:56 am

Ahh, I see

I just noticed that the actually do change in size in game if I change the Width and Height in the art layer. Was hoping it was that simple :tongue:



Also, I just want to tell you that I appreciate your help.
User avatar
Brooke Turner
 
Posts: 3319
Joined: Wed Nov 01, 2006 11:13 am

Post » Tue Nov 20, 2012 1:36 pm

Great, tell me if you have more questions. :)
User avatar
Lawrence Armijo
 
Posts: 3446
Joined: Thu Sep 27, 2007 7:12 pm

Post » Tue Nov 20, 2012 8:47 am

Thread bookmarked for invaluable information. :goodjob:
User avatar
Natasha Biss
 
Posts: 3491
Joined: Mon Jul 10, 2006 8:47 am

Post » Tue Nov 20, 2012 7:48 am

Hey seventyfour, check out my new beta I released, thanks to the help of you.

http://skyrim.nexusmods.com/mods/25501
User avatar
Leanne Molloy
 
Posts: 3342
Joined: Sat Sep 02, 2006 1:09 am

Post » Tue Nov 20, 2012 10:40 am

Also, am using Adobe Flash CS5, if that matters.
We are using CS4, AFAIK it's also what Bethesda used. CS5 should work, too, but if you still have CS4, I'd rather recommend that.

BTW, if you used https://github.com/Mardoxx/skyrimui, you should give credit as requested in the permission instructions.
User avatar
ChloƩ
 
Posts: 3351
Joined: Sun Apr 08, 2007 8:15 am

Post » Tue Nov 20, 2012 12:09 pm

Hey seventyfour, check out my new beta I released, thanks to the help of you.

http://skyrim.nexusmods.com/mods/25501

I am going to be doing something similar for my mod eventually as well, with its own map. :smile: (IF we stick to the skyrim game engine... kind of doubting that at the moment though.)
User avatar
Jason Wolf
 
Posts: 3390
Joined: Sun Jun 17, 2007 7:30 am

Post » Tue Nov 20, 2012 12:21 pm

My main hope was making a 2d map, but because of the way the location discover works, it isn't feasible to move the map marker locations to the "flat plane" of the 2d map.

@shlangster, I will add the credits immediately, and I apologize for not immediately doing so. It is because of your teams decompiled files I was able to work with such ease. I am eternally grateful what your team has done for everyone in the community.


Edit: Credit given
User avatar
Travis
 
Posts: 3456
Joined: Wed Oct 24, 2007 1:57 am


Return to V - Skyrim