Can't get a simple mod to work

aeroripperaeroripper Join Date: 2005-02-25 Member: 42471NS1 Playtester, Forum Moderators, Constellation
I'm am trying to replace "spinner.dds" with a custom one. I followed these instructions:

http://unknownworlds.com/ns2/time-to-make-the-mods/

I made a new folder "ui" under my source folder. My directory structure looks like this:

ui/loading/spinner.dds

In my ModShared.lua it looks like this:

Script.Load("ui/loading/spinner.dds")

It shoots out an error in console that says file not found. What am I doing wrong? The ubershotgun mod works fine, although I'm not loading it currently.



Comments

  • McGlaspieMcGlaspie www.team156.com Join Date: 2010-07-26 Member: 73044Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, Squad Five Gold, Reinforced - Onos, WC 2013 - Gold, Subnautica Playtester
    That's a generic error saying "I can't load this"

    You're first problem is you're trying to load a DDS (Direct Draw Surface) file as a Lua script. That's impossible for a number of reasons.
    The second problem you have, is you're trying to treat your minor graphics change like a code-level change mod. No code needs to be changed for what you're doing.

    All you need to do is drop your spinner.dds file in the appropriate folder (match what NS2 uses), and you're done.
  • aeroripperaeroripper Join Date: 2005-02-25 Member: 42471NS1 Playtester, Forum Moderators, Constellation
    edited October 2013
    I removed the line from ModShared.lua.
    McGlaspie wrote: »
    The second problem you have, is you're trying to treat your minor graphics change like a code-level change mod. No code needs to be changed for what you're doing.

    All you need to do is drop your spinner.dds file in the appropriate folder (match what NS2 uses), and you're done.

    I already did this, but the problem persists:
    I made a new folder "ui" under my source folder. My directory structure looks like this:

    ui/loading/spinner.dds

    ^ This is the normal directory structure in the /Natural Selection 2/ns2/ui/loading/spinner.dds folder.

    Other notes:

    - Builder is open, and updating properly
    - Clicking 'launch game' from within launchpad. It shows my mod title at the top of the menu bar.
    - Mod is unpublished currently, but it should still work.

  • SamusDroidSamusDroid Colorado Join Date: 2013-05-13 Member: 185219Members, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    edited October 2013
    Steps. Create mod folder, create a mod in that folder. If you save your file in PSD, drop it into source/ui/loading named spinner.PSD. Then run builder. If you save it as a dds then put it into output/ui/loading/spinner.dds. Then run run the game through Launchpad. No Lua files needed.

    Builder will not build files already in the right file type. You don't even need a .material file unless you change the name of the files so they differ from the normal files.
  • aeroripperaeroripper Join Date: 2005-02-25 Member: 42471NS1 Playtester, Forum Moderators, Constellation
    That worked, thanks for the help guys ^^ I'm still pretty newb at this stuff.
Sign In or Register to comment.