Exchanging objects in the world for others?

Post » Thu Jun 21, 2012 11:47 am

I want to change some models in the in game world in a specific way. Lets say I have a sword that Bethesda placed into the world...a steel sword for example. I want to change the base object of the Steel Sword into a Dummy Sword, and then give it a Leveled list that can randomize what item it actually is. Is it possible for me to change the base object while keeping it's place in the world? I basically just want to keep the sword's positioning, whether it has Havok or not, etc, I just want the actual sword that is placed there to be randomized with a Leveled List.

I saw they did this a lot with Dummy Weapons, but I dont know if its possible to change an already placed weapon's base object into a different one.

Can anyone help? :)
User avatar
Nany Smith
 
Posts: 3419
Joined: Sat Mar 17, 2007 5:36 pm

Post » Thu Jun 21, 2012 6:19 pm

Hi Shingouki... I was in need to something similiar a while back. In my case, I was trying to replace objects that a mod changed in the CK. I didn't have much luck in finding what I needed, but this is what I came up with:

carriage =  Game.GetForm(0x000DDDA4) as ObjectReference ;carriagecarriage.Disable()carriage.Delete()carriage.PlaceAtMe(Game.GetForm(0x00104F6F)) ;CartFurnitureStatic01

It's considered poor practise to use form ID's so if I was using this in a regular mod, I would pass in the base object, like I do for this call (which is in my released mod):

ObjectReference newNewCart = newCart.PlaceAtMe(ScenicCarriagesCarriageBase,1)

Unfortunately, I wasn't able to fix the damage from that other mod, but I do think this code was working as I could see the new carriages being created. If this is wrong, maybe someone can point out the error of my ways and we can both learn something!
User avatar
michael flanigan
 
Posts: 3449
Joined: Thu Jun 14, 2007 2:33 pm

Post » Thu Jun 21, 2012 7:35 am

Actually, I think what shingouki wants is to use the http://www.creationkit.com/Edit_Menu#Search_.26_Replace_.28CTRL.2BF.29 in the Creation Kit.

And I guess this is off-topic, but I don't understand what you meant by "damage from that other mod".
User avatar
Horse gal smithe
 
Posts: 3302
Joined: Wed Jul 05, 2006 9:23 pm

Post » Thu Jun 21, 2012 8:49 pm

Actually, I think what shingouki wants is to use the http://www.creationkit.com/Edit_Menu#Search_.26_Replace_.28CTRL.2BF.29 in the Creation Kit.

Duh, yes, probably!!

And I guess this is off-topic, but I don't understand what you meant by "damage from that other mod".
Yes, damage was probably a poor choice of words... it was late for me when I posted that. But what I maen is that the other mod left the players save game file in a state that didn't allow them to use the default game functionality. (To many of those players, their game was completely screwed up.) So I have searched for a way to put the Bethesda default objects back to their original state.

Example: In the first beta release of ScenicCarriages, I simply went in to the CK and used the Search & Replace funcationality and replaced the static carriages with the movable ones. All was good... until the player uninstalled. Then they couldn't use the regular Skyrim vanilla carriages. So I redid my mod so I wasn't changing the base game objects. Which to someone who isn't knew, is probably standard practise anyway... but I learned. Since my mod was in beta and I warned people NOT to save, very few did, so it's not a problem.

If you have any thoughts on a different approach, I'd sure love to get that "fix" mod working.
User avatar
Jeffrey Lawson
 
Posts: 3485
Joined: Tue Oct 16, 2007 5:36 pm

Post » Thu Jun 21, 2012 5:19 pm

Actually, I think what shingouki wants is to use the http://www.creationkit.com/Edit_Menu#Search_.26_Replace_.28CTRL.2BF.29 in the Creation Kit.

Yes this helped me to do what I wanted to do, thank you!

But now I have another issue.

Right now I'm trying to change all the Imperial Swords in an area to be randomized weapons from a Leveled List. I changed the base objects of some imperial swords to CWDummyImperialSword (or something like that), for some weapons on a weapon rack. Then I set the Leveled List to be a custom Leveled list I made. But when I went into the room with the weapon racks there are no weapons there, and everything else in the room knocks off it's shelf and flies around at Mach speed.

Totally stumped about how to fix this...

I mostly just want the randomized weapons from my Leveled Lists to appear in the Imperial Sword's place.
User avatar
Isabell Hoffmann
 
Posts: 3463
Joined: Wed Apr 18, 2007 11:34 pm


Return to V - Skyrim