OK, example..... when I built my jedis for -SMD- Dream Teams I made a world that loaded up the shipped naboo map. So i didnt have a world, just some lua script. One by one I added my jedis creating a big jedis brawl. As I ran out of slots, I removed some jedis and just kept on adding more. When I was done I had a Naboo full of jedis, and was quite happy with how things went. Now it was time to make more maps and decide which jedis would play which worlds blah blah blah... how was I going to do it ?
Most people would create a SIDE for the game rather than have a SIDE stuck in some mod world, but this is highly unecessary and to me it would just complicate the install and uninstall. I think it may also run more risks of incompatibilty.
I swear I looked for this, even using google and so if its an old topic I apologize, but at least this one people will find.
As some of you may know the string "..\\" is a relative file reference that goes back one directory. If you have had to program relative paths that are not subdirectories but are parent directories, then you have probably come across this. As it happens, to go from one mod directory to another, we need to back up three directories. We can do this using "..\\..\\..\\".
Well in my example my jedi naboo mod folder is called Z2N and I want to load stuff from there into another mod. I use the line :
ReadDataFile("dc:..\\..\\..\\Z2N\\data\\_LVL_PC\\SIDE\\smd.lvl",
"smd_hero_gungan3", "smd_hero_chewbacca", "smd_hero_drako",
"smd_hero_anakin")
to load up four of the 32 jedis stored in the SIDE folder for Z2N. As you know if the SIDE was in my current mods folder I would use the line dc:SIDE\\smd.lvl
As it happens the game is coded to see the dc: (downloadable content) and jump to the XXX\\data\\_LVL_PC folder....and thats why dc:SIDE\\ works because its a relative path to the current directory.
Once I realized this I kept adding custom classes where i needed them, with some organization, and simply loading them into other maps using a relative path. It was great because it kept my installs as a simple zip, while still enabling me to make expansions that built upon my previous work.
Loading from a SIDE in another mod folder
Moderator: Moderators
- SHOOT ME DEAD !
- Private Recruit
- Posts: 22
- Joined: Wed Jun 17, 2009 10:53 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Contact:
-
RogueKnight
- Space Ranger
- Posts: 2512
- Joined: Sat Nov 22, 2008 1:50 pm
- Projects :: Life. Work.
- xbox live or psn: No gamertag set
- Location: Washington, US
Re: Loading from a SIDE from another mod folder
*facepalm*
Topic #9.......
another topic to tell everyone something we already know.....
We aren't exactly n00b modders here bud, after all GT and its occupants are the makers of Convo Pack, BFX, BF0, Dark Times, Tean and his Xbox mod, ect....
We know our way around the modtools, and how to do most of this stuff.
Topic #9.......
another topic to tell everyone something we already know.....
We aren't exactly n00b modders here bud, after all GT and its occupants are the makers of Convo Pack, BFX, BF0, Dark Times, Tean and his Xbox mod, ect....
We know our way around the modtools, and how to do most of this stuff.
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Loading from a SIDE from another mod folder
Play nice. He did say he searched for old topics and it seems all he wants to do is help. Don't reject something offhand just because it comes from someone new to the site.DarthRogueKnight wrote:another topic to tell everyone something we already know.....
OP: Just for your own reference, this is noted in the "How to add Dark Times to your mod" topic and it is referenced in every addme.lua created in a modmap (this is how the addon map's core.lvl is loaded). Thank you for searching beforehand, though.
