Exporting and importing meshes
Exporting and importing meshes
I want to import some stuff into my own MOD. like the ''spinner''
only problem, how do I get the spinner mesh and sounds from the spinner.u to mymod.u file?
only problem, how do I get the spinner mesh and sounds from the spinner.u to mymod.u file?
Re: Exporting and importing meshes
Ask permission?
By far the easiest way is to leave the original u file alone and call it from your mod, making whatever changes you want along the way. Since it is called you won't need serverpackage lines, just to have it on server. Make oop work for you!
In cases where I just want a small part of a very large mod I use WOTgreal exporter. It isn't perfect but it does OK sometimes. I usually tried to stick with option 1, however there are several "spinner" u's floating around so exporting it would be wise to avoid mismatch. If that is all you need, let me know. I still have the source for it from working on Survival.
By far the easiest way is to leave the original u file alone and call it from your mod, making whatever changes you want along the way. Since it is called you won't need serverpackage lines, just to have it on server. Make oop work for you!
In cases where I just want a small part of a very large mod I use WOTgreal exporter. It isn't perfect but it does OK sometimes. I usually tried to stick with option 1, however there are several "spinner" u's floating around so exporting it would be wise to avoid mismatch. If that is all you need, let me know. I still have the source for it from working on Survival.
Re: Exporting and importing meshes
dont worry. Im not saying I wont ask permission
and I want to import it, because I need to subclass it under my superclass
thanks, I will let you know when I get to that part
and I want to import it, because I need to subclass it under my superclass
thanks, I will let you know when I get to that part
Re: Exporting and importing meshes
The permission thing was totally meant as a joke. I'm of the opinion that everything should be open source. There is no higher honor than to see your stuff used by someone else.
- editor Dave
- Inhuman
- Posts: 904
- Joined: Mon Mar 10, 2008 6:40 pm
- Personal rank: Passionate SP Mapper
- Location: Germany/Bavaria
- Contact:
Re: Exporting and importing meshes
Type in your console Beforehand you have to create a new package called "mymod".
I don't know if it works because I only know this comand line in combination with MyLevel. But it should...
Code: Select all
obj load file=spinner.u package=mymod
I don't know if it works because I only know this comand line in combination with MyLevel. But it should...
10-Year Anniversary on Jun 08, 2019.
Re: Exporting and importing meshes
That will work in a map package's mylevel but if you insert this into the compiled code as an Exec line you will create a dependency on the old package no matter how you code it.
- editor Dave
- Inhuman
- Posts: 904
- Joined: Mon Mar 10, 2008 6:40 pm
- Personal rank: Passionate SP Mapper
- Location: Germany/Bavaria
- Contact:
Re: Exporting and importing meshes
I tried it. It does work:
1. I used this comand to import AsgardPredator.u in a new (not yet existing) package I named "Monsters"
2. I imported a second package (AsgardSpinner.u) in the new one.
3. I saved the Monsters.u package
4. I restarted the ED and opened Monsters.u
5. Now you see this package contains the Spinners as well as the Predator.
This line works with every Unreal file.
That's exactly what he wanted or am I wrong?
What I did:1. I used this comand to import AsgardPredator.u in a new (not yet existing) package I named "Monsters"
2. I imported a second package (AsgardSpinner.u) in the new one.
3. I saved the Monsters.u package
4. I restarted the ED and opened Monsters.u
5. Now you see this package contains the Spinners as well as the Predator.
This line works with every Unreal file.
That's exactly what he wanted or am I wrong?
10-Year Anniversary on Jun 08, 2019.
Re: Exporting and importing meshes
The problem is you still have the dependency to the old package. Importing packages together like this will not change the code, just the "packaging" so to speak. It's like making a mylevel but with a container file.
Try deleting the original package and you'll see it most likely will not work now. This is because the original code in the mod calls to a package no longer there. In essence what you are doing is option 1 from my original post: Extending the original code. This won't always be the case as some mods have such generic code that there are no package calls from inside but it's a pretty good rule of thumb.
Think about the packages int file now. What does it reference if you remove the original mod?
Try deleting the original package and you'll see it most likely will not work now. This is because the original code in the mod calls to a package no longer there. In essence what you are doing is option 1 from my original post: Extending the original code. This won't always be the case as some mods have such generic code that there are no package calls from inside but it's a pretty good rule of thumb.
Think about the packages int file now. What does it reference if you remove the original mod?
- editor Dave
- Inhuman
- Posts: 904
- Joined: Mon Mar 10, 2008 6:40 pm
- Personal rank: Passionate SP Mapper
- Location: Germany/Bavaria
- Contact:
Re: Exporting and importing meshes
I agree, when there are .int files there are problems but he never mentioned anything about them, didn't he?
I can open the Monsters.u even when I delete the original packages so this dependency only belongs to .int files. Let's wait for an answer which files exactly he wants to merge.
I can open the Monsters.u even when I delete the original packages so this dependency only belongs to .int files. Let's wait for an answer which files exactly he wants to merge.
10-Year Anniversary on Jun 08, 2019.
Re: Exporting and importing meshes
The dependency solely depends on the code. Let me show you an example. Here is a sample of the code from Monsterhunt2v2:
Don't get confused guys, int files are mostly used to declare a mod for offline games. Making one for an improperly generated compilation mod will not magically make it work if you break the interior code.
Now this is a varied assortment but it's all from one class. If you add the mod into another package without also keeping the original mod on server (or installed) then all these calls will no longer work, since they look for a package that doesn't exist.if(Other.IsA('Flashlight') && !Other.IsA('LimeLight'))
{
ReplaceWith(Other,"MonsterHunt2v2.LimeLight");
return false;
}
++++++++++++++++
if(UseMHTranslocator)
DeathMatchPlus(Level.Game).GiveWeapon(Other,"MonsterHunt2v2.MHTranslocator");
++++++++++++++++
// This is added inventory to allow the double jump mod to function
InventoryClass = class<DJ_InventoryItem>(DynamicLoadObject("MonsterHunt2v2.DJ_InventoryItem", class'Class'));
++++++++++++++++
defaultproperties
{
KHMNaliFruit="MonsterHunt2v2.KHMNaliFruit"
Don't get confused guys, int files are mostly used to declare a mod for offline games. Making one for an improperly generated compilation mod will not magically make it work if you break the interior code.