Results 1 to 34 of 34

Campaign Scripting

  1. #1

    Campaign Scripting

    So i was wondering if someone could do better at explaining how to make a custom campaign than this guide (hurray i can finally post links):
    http://hw2wiki.net/wiki.hw2.info/TutorialCampaign.html
    I followed everything it said but the game would crash as soon as i clicked on single player lawl
    I'm not particularly looking for someone to make this single campaign mission for me (because i am working on a second mod that requires less work but many campaign missions for when i finish the original mod and finally present it as a gift to my friend) but i would rather learn this on my own like i have everything else x3
    well except for the ship icons. Thanks Dim xD the guide i read had the answer too but while i was still making my first ship i skipped the ship icon explanation because i was still trying to get just the first ship to work and then forgot all about it entirely z.z
    so if anyone knows any better guides or doesn't mind reviewing code with me that would be nice ^^
    though right now i probably need more than just code review since i cannot even get the game to load the mission selection without crashing :c

  2. #2
    Member Dim@'s Avatar
    Join Date
    Jul 2007
    Location
    Battlecruiser complete
    If you know how to code, you can learn a lot by looking through this (especially after playing through mission 1):
    http://hw2wiki.net/wiki.hw2.info/ReferenceSampleCampaignLUA.html

    My scripting tutorial (in my sig) gives an introduction to gamerule scripting. Gamerule scripting is *basically* the same in both the campaign and in multiplayer. The major difference in the campaign is that the maps are pre-made, with pre-placed ships already added into SobGroups, and sometimes waypoints and stuff already placed.

    If you game is crashing, you should read the file at Bin\Release\Hw2.log
    Also, you can add "-luaTrace" to your shortcut, which will allow you to use "print()" functions in your code, and they will write to the log.

    If you continue to have questions, post them here.
    Destroying things is easy.
    Creating things is hard.
    Creating things in order to watch them explode is just plain fun.

    Explosion Damage Script, Scripting Tutorial

  3. #3
    Member Chimas's Avatar
    Join Date
    Jun 2012
    Location
    now watching c-beams glitter in the dark near Tannhäuser Gate
    A-há, I was looking for (something like) that ...
    Last edited by Chimas; 21st Jun 12 at 5:52 AM. Reason: lack of context

  4. #4
    I have never scripted before but I'll happily give it a try!
    thanks for the links :3

    as for the logfiles they just give me a bunch of technical stuff i do not understand z.z
    also i just checked the location of the logfiles (Since i have not checked them for a while cuz i do not understand the technical data as i said xD) and it turns out i have ALOT...from all the times i was modding and didn't know what i was doing yet lawl
    137 log files...274 including these dump files 8D
    Last edited by LennethValkyrie; 21st Jun 12 at 12:18 PM.

  5. #5
    Hahaha...so thanks to the guide, reviewing the tutorial i have read, and comparing code from the link you provided i managed to get the mission select screen to load. In fact i managed to get the game to load Universe and Load Level...but then it crashes at "LoadScarScript" z.z
    in my m01 folder i have the .lua file set to load the Scar reference so i don't know what is wrong x3
    here is my log file~
    Code:
    Homeworld2.exe caused a Breakpoint in module Debug.dll at 0023:002819b6.
    Error occurred at 6/21/2012 18:30:32.
    Homeworld2.exe, run by lynnkay1955.
    Microsoft Windows XP?.
    2 processor(s), type 586.
    3701 MBytes physical memory.
    
    MiniDump saved to file 'C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\6-21-2012_18_30_32_MiniDump.dmp'
    
    Registers:
    EAX=00000000 CS=0023 EIP=002819b6 EFLGS=00000202
    EBX=00000000 SS=002b ESP=0018f310 EBP=0018fdc8
    ECX=7c014444 DS=002b ESI=00000024 FS=0053
    EDX=0008e3c8 ES=002b EDI=000003f6 GS=002b
    Bytes at CS:EIP:
    cc 83 4d fc ff 8d 8d 5c fe ff ff e8 9b fc ff ff 
    
    Call Stack:
    0x002819B6: dbFatalfAux                                 (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\Debug.dll)
    0x0062519F: getLibraryID                                (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\Homeworld2.exe)
    0x004948BF: GSLobbySessionDesc::operator=               (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\Homeworld2.exe)
    0x0049034A: GSLobbySessionDesc::operator=               (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\Homeworld2.exe)
    0x004908DE: GSLobbySessionDesc::operator=               (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\Homeworld2.exe)
    0x00490961: GSLobbySessionDesc::operator=               (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\Homeworld2.exe)
    
    
    
    
    
    
    
    
    
    
    
    
    0x0068F798: getLibraryID                                (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\Homeworld2.exe)
    
    0x7C02C54E: feof                                        (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\MSVCR70.dll)
    0x7C02AE09: fopen                                       (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\MSVCR70.dll)
    0x7C028360: srand                                       (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\MSVCR70.dll)
    0x7C007106: strchr                                      (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\MSVCR70.dll)
    0x7C003CED: swprintf                                    (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\MSVCR70.dll)
    0x7C00126B: memcpy                                      (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\MSVCR70.dll)
    0x7C00149A: memcmp                                      (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\MSVCR70.dll)
    0x7C01C12F: _RTDynamicCast                              (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\MSVCR70.dll)
    0x7C0010FD: memset                                      (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\MSVCR70.dll)
    0x7C0276F0: purecall                                    (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\MSVCR70.dll)
    0x7C0152EA: atoi                                        (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\MSVCR70.dll)
    0x7C002493: strlen                                      (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\MSVCR70.dll)
    0x7C033ED6: fabs                                        (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\MSVCR70.dll)
    0x7C0088DD: sqrt                                        (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\MSVCR70.dll)
    0x7C00882F: sin                                         (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\MSVCR70.dll)
    0x7C01B9D1: CxxThrowException                           (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\MSVCR70.dll)
    0x7C01BA8F: _CxxFrameHandler                            (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\MSVCR70.dll)
    0x7C003F12: memmove                                     (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\MSVCR70.dll)
    0x7C0011EE: initterm                                    (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\MSVCR70.dll)
    0x7C00F323: _setusermatherr                             (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\MSVCR70.dll)
    0x7C04923C: adjust_fdiv                                 (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\MSVCR70.dll)
    0x7C004986: _p__commode                                 (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\MSVCR70.dll)
    0x7C004980: _p__fmode                                   (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\MSVCR70.dll)
    0x7C005283: _set_app_type                               (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\MSVCR70.dll)
    0x7C006EBD: except_handler3                             (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\MSVCR70.dll)
    0x7C006C23: _getmainargs                                (C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\MSVCR70.dll)
    
    Stack dump:
    
    
    
    Module list: names, addresses, sizes, time stamps and file times:
    C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\Memory.dll, loaded at 0x00030000 - 33280 bytes - 3f3c341b - file date is 8/14/2003 18:15:08
    C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\Platform.dll, loaded at 0x00240000 - 98304 bytes - 3f3c346d - file date is 8/14/2003 18:16:30
    C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\Localizer.dll, loaded at 0x00260000 - 94208 bytes - 3f3c3468 - file date is 8/14/2003 18:16:26
    C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\Debug.dll, loaded at 0x00280000 - 10752 bytes - 3f3c3417 - file date is 8/14/2003 18:15:04
    C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\FileIO.dll, loaded at 0x00290000 - 155648 bytes - 3f3c3461 - file date is 8/14/2003 18:16:18
    C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\ZLib.dll, loaded at 0x00340000 - 49152 bytes - 3f3c344d - file date is 8/14/2003 18:16:00
    C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\lua.dll, loaded at 0x00350000 - 73728 bytes - 3f3c3472 - file date is 8/14/2003 18:16:36
    C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\LuaConfig.dll, loaded at 0x00370000 - 53248 bytes - 3f3c3476 - file date is 8/14/2003 18:16:40
    C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\Util.dll, loaded at 0x00380000 - 36864 bytes - 3f3c3489 - file date is 8/14/2003 18:16:58
    C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\hw2box.dll, loaded at 0x00390000 -  9728 bytes - 3f3c3486 - file date is 8/14/2003 18:16:56
    C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\divxmedialib.dll, loaded at 0x003a0000 - 86016 bytes - 3f3bc007 - file date is 8/14/2003 18:08:56
    C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\FileParser.dll, loaded at 0x003c0000 - 86016 bytes - 3f3bc005 - file date is 8/14/2003 18:08:56
    C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\Homeworld2.exe, loaded at 0x00400000 - 5333031 bytes - 37373778 - file date is 9/16/2003 15:37:16
    C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\DivxDecoder.dll, loaded at 0x00940000 - 397312 bytes - 3f3bc002 - file date is 8/14/2003 18:08:56
    C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\gslobby.dll, loaded at 0x009b0000 - 135168 bytes - 3f3c3510 - file date is 8/14/2003 18:19:14
    C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\objects.dll, loaded at 0x00b30000 - 1093632 bytes - 3f3c358d - file date is 8/14/2003 18:21:20
    C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\GL.DLL, loaded at 0x031f0000 - 294912 bytes - 3f3c35a0 - file date is 8/14/2003 18:21:38
    C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\seFDAudio.dll, loaded at 0x032d0000 - 40960 bytes - 3f3c34d7 - file date is 8/14/2003 18:18:16
    C:\Windows\system32\atiadlxy.dll   , loaded at 0x04a70000 - 262144 bytes - 4dcc4f39 - file date is 5/12/2011 18:21:00
    C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\console.dll, loaded at 0x10000000 -  5632 bytes - 3f3c3514 - file date is 8/14/2003 18:19:18
    C:\Windows\system32\atioglxx.dll   , loaded at 0x69030000 - 17907200 bytes - 4dcc59b4 - file date is 5/12/2011 19:05:50
    C:\Windows\system32\dsound.dll     , loaded at 0x6a420000 - 453632 bytes - 4a5bd9fd - file date is 7/13/2009 18:15:14
    C:\Windows\system32\AUDIOSES.DLL   , loaded at 0x6b010000 - 195584 bytes - 4ce7b725 - file date is 11/20/2010 20:23:56
    C:\Windows\System32\MMDevApi.dll   , loaded at 0x6bae0000 - 213504 bytes - 4ce7b892 - file date is 11/20/2010 20:23:52
    C:\Windows\system32\NTDSAPI.dll    , loaded at 0x6bb20000 - 90112 bytes - 4a5bdade - file date is 7/13/2009 18:16:12
    C:\Windows\system32\wbem\fastprox.dll, loaded at 0x6bb40000 - 606208 bytes - 4ce7b809 - file date is 11/20/2010 20:24:26
    C:\Windows\system32\wbem\wbemsvc.dll, loaded at 0x6bfe0000 - 47616 bytes - 4a5bdb30 - file date is 7/13/2009 18:16:18
    C:\Windows\system32\avrt.dll       , loaded at 0x6c010000 - 14336 bytes - 4a5bd998 - file date is 7/13/2009 18:15:00
    C:\Windows\system32\wbemcomn.dll   , loaded at 0x6c030000 - 363008 bytes - 4ce7ba25 - file date is 11/20/2010 20:24:10
    C:\Windows\system32\wbem\wbemprox.dll, loaded at 0x6c090000 - 29184 bytes - 4a5bdb2f - file date is 7/13/2009 18:16:18
    C:\Windows\system32\apphelp.dll    , loaded at 0x6dd80000 - 295936 bytes - 4ce7b73e - file date is 11/20/2010 20:24:16
    C:\Windows\system32\DDRAW.dll      , loaded at 0x6edc0000 - 531968 bytes - 4a5bd9b8 - file date is 7/13/2009 18:15:12
    C:\Windows\system32\UxTheme.dll    , loaded at 0x6eeb0000 - 245760 bytes - 4a5bdb3c - file date is 7/13/2009 18:11:26
    C:\Windows\SysWOW64\d3d10.dll      , loaded at 0x6f1e0000 - 1030144 bytes - 4a5bd9a0 - file date is 7/13/2009 18:15:08
    C:\Windows\SysWOW64\d3d10core.dll  , loaded at 0x6f380000 - 190464 bytes - 4a5bd9a3 - file date is 7/13/2009 18:15:08
    C:\Windows\system32\winmm.dll      , loaded at 0x6f540000 - 194048 bytes - 4ce7ba42 - file date is 11/20/2010 20:24:18
    C:\Windows\system32\dwmapi.dll     , loaded at 0x6f580000 - 67072 bytes - 4a5bda07 - file date is 7/13/2009 18:15:14
    C:\Windows\system32\MPR.dll        , loaded at 0x70f30000 - 64000 bytes - 4a5bda36 - file date is 7/13/2009 18:15:42
    C:\Windows\system32\rsaenh.dll     , loaded at 0x71950000 - 242936 bytes - 4a5bdae0 - file date is 7/13/2009 18:17:56
    C:\Windows\system32\CRYPTSP.dll    , loaded at 0x71990000 - 78848 bytes - 4a5bda3d - file date is 7/13/2009 18:15:08
    C:\Windows\SysWOW64\POWRPROF.dll   , loaded at 0x719b0000 - 145408 bytes - 4a5bdb0c - file date is 7/13/2009 18:16:14
    C:\Windows\system32\WTSAPI32.dll   , loaded at 0x72b80000 - 40448 bytes - 4ce7ba64 - file date is 11/20/2010 20:23:56
    C:\Program Files\AVAST Software\Avast\snxhk.dll, loaded at 0x72cc0000 - 215736 bytes - 4f56a5b0 - file date is 3/6/2012 16:15:14
    C:\Windows\system32\RpcRtRemote.dll, loaded at 0x731c0000 - 46080 bytes - 4ce7992f - file date is 11/20/2010 20:24:16
    C:\Windows\system32\dbghelp.dll    , loaded at 0x73540000 - 854016 bytes - 4ce7b7bc - file date is 11/20/2010 20:24:10
    C:\Windows\system32\profapi.dll    , loaded at 0x73630000 - 31744 bytes - 4a5bbf41 - file date is 7/13/2009 18:16:14
    C:\Windows\system32\USERENV.dll    , loaded at 0x73640000 - 81920 bytes - 4ce7ba28 - file date is 11/20/2010 20:24:18
    C:\Windows\system32\version.dll    , loaded at 0x73670000 - 21504 bytes - 4a5bdb2b - file date is 7/13/2009 18:16:18
    C:\Windows\System32\PROPSYS.dll    , loaded at 0x739f0000 - 988160 bytes - 4ce7b983 - file date is 11/20/2010 20:24:10
    C:\Windows\AppPatch\AcGenral.DLL   , loaded at 0x73b80000 - 2175488 bytes - 4ce7b6ff - file date is 11/20/2010 20:24:02
    C:\Windows\system32\aticfx32.dll   , loaded at 0x73db0000 - 688128 bytes - 4dcc5904 - file date is 5/12/2011 19:02:46
    C:\Windows\system32\opengl32.dll   , loaded at 0x73e60000 - 791552 bytes - 4a5bdadb - file date is 7/13/2009 18:16:14
    C:\Windows\SysWOW64\d3d11.dll      , loaded at 0x73f30000 - 522752 bytes - 4ce7b7b0 - file date is 11/20/2010 20:23:56
    C:\Windows\SysWOW64\dxgi.dll       , loaded at 0x745a0000 - 508416 bytes - 4ce7b819 - file date is 11/20/2010 20:24:10
    C:\Windows\SysWOW64\d3d10_1core.dll, loaded at 0x74630000 - 219136 bytes - 4ce7b7ac - file date is 11/20/2010 20:23:50
    C:\Windows\SysWOW64\d3d10_1.dll    , loaded at 0x74670000 - 161792 bytes - 4d33d5a3 - file date is 7/27/2011 17:20:30
    C:\Windows\system32\GLU32.dll      , loaded at 0x74820000 - 130048 bytes - 4a5bd9df - file date is 7/13/2009 18:15:24
    C:\Windows\system32\atiglpxx.dll   , loaded at 0x74a50000 - 12800 bytes - 4dcc4f2e - file date is 5/12/2011 18:20:48
    C:\Windows\SysWOW64\dxdiagn.dll    , loaded at 0x74a60000 - 210432 bytes - 4ce7b818 - file date is 11/20/2010 20:24:24
    C:\Windows\system32\atigktxx.dll   , loaded at 0x74ae0000 - 32768 bytes - 4dcc4f24 - file date is 5/12/2011 18:20:38
    C:\Windows\system32\DCIMAN32.dll   , loaded at 0x74af0000 - 10240 bytes - 4a5bd9b4 - file date is 7/13/2009 18:15:10
    C:\Windows\system32\winbrand.dll   , loaded at 0x74b00000 - 12800 bytes - 4a5bdb39 - file date is 7/13/2009 18:16:20
    C:\Windows\system32\sfc_os.DLL     , loaded at 0x74b10000 - 40960 bytes - 4a5bdb02 - file date is 7/13/2009 18:16:16
    C:\Windows\system32\sfc.dll        , loaded at 0x74b50000 -  2560 bytes - 4a5bdb01 - file date is 7/13/2009 18:10:24
    C:\Windows\system32\samcli.dll     , loaded at 0x74b70000 - 51200 bytes - 4ce7b9a0 - file date is 11/20/2010 20:23:56
    C:\Windows\system32\MSACM32.dll    , loaded at 0x74ba0000 - 72192 bytes - 4a5bda4e - file date is 7/13/2009 18:15:44
    C:\Windows\system32\WSOCK32.dll    , loaded at 0x74be0000 - 15360 bytes - 4a5bdb63 - file date is 7/13/2009 18:16:22
    C:\Windows\syswow64\CRYPTBASE.dll  , loaded at 0x75120000 - 36864 bytes - 4a5bbf41 - file date is 7/13/2009 18:15:08
    C:\Windows\syswow64\SspiCli.dll    , loaded at 0x75130000 - 96768 bytes - 4ec49b90 - file date is 11/16/2011 22:28:50
    C:\Windows\syswow64\imagehlp.dll   , loaded at 0x75190000 - 159232 bytes - 4f4f07d3 - file date is 2/29/2012 22:33:24
    C:\Windows\syswow64\ole32.dll      , loaded at 0x751c0000 - 1414144 bytes - 4ce7b96f - file date is 11/20/2010 20:24:02
    C:\Windows\syswow64\WS2_32.dll     , loaded at 0x75320000 - 206848 bytes - 4ce7ba68 - file date is 11/20/2010 20:23:56
    C:\Windows\syswow64\NSI.dll        , loaded at 0x75360000 -  8704 bytes - 4a5bdad9 - file date is 7/13/2009 18:16:12
    C:\Windows\syswow64\USP10.dll      , loaded at 0x75400000 - 626176 bytes - 4d5cbb5a - file date is 7/27/2011 17:21:20
    C:\Windows\syswow64\GDI32.dll      , loaded at 0x754a0000 - 311296 bytes - 4ce7ba53 - file date is 11/20/2010 20:24:16
    C:\Windows\syswow64\ADVAPI32.dll   , loaded at 0x75530000 - 640512 bytes - 4ce7b706 - file date is 11/20/2010 20:24:30
    C:\Windows\syswow64\CFGMGR32.dll   , loaded at 0x755d0000 - 145920 bytes - 4ddb8851 - file date is 5/24/2011 03:39:40
    C:\Windows\syswow64\Normaliz.dll   , loaded at 0x75650000 -  2048 bytes - 4a5bdad4 - file date is 7/13/2009 18:09:02
    C:\Windows\syswow64\SETUPAPI.dll   , loaded at 0x75660000 - 1667584 bytes - 4ce7b9d9 - file date is 11/20/2010 20:23:52
    C:\Windows\syswow64\USER32.dll     , loaded at 0x75800000 - 833024 bytes - 4ce7ba59 - file date is 11/20/2010 20:24:22
    C:\Windows\syswow64\RPCRT4.dll     , loaded at 0x75900000 - 663040 bytes - 4ce7ba59 - file date is 11/20/2010 20:24:12
    C:\Windows\syswow64\WININET.dll    , loaded at 0x759f0000 - 1129472 bytes - 4fb57d37 - file date is 5/17/2012 15:35:48
    C:\Windows\syswow64\msvcrt.dll     , loaded at 0x75b10000 - 690688 bytes - 4eeaf722 - file date is 12/16/2011 00:53:00
    C:\Windows\syswow64\kernel32.dll   , loaded at 0x75bc0000 - 1114112 bytes - 4e211318 - file date is 7/15/2011 21:24:24
    C:\Windows\syswow64\SHELL32.dll    , loaded at 0x75cd0000 - 12872704 bytes - 4f0412de - file date is 1/4/2012 01:59:40
    C:\Windows\syswow64\SHLWAPI.dll    , loaded at 0x76920000 - 350208 bytes - 4ce7b9e2 - file date is 11/20/2010 20:23:50
    C:\Windows\syswow64\MSASN1.dll     , loaded at 0x76980000 - 34304 bytes - 4ce7b8c9 - file date is 11/20/2010 20:23:50
    C:\Windows\syswow64\DEVOBJ.dll     , loaded at 0x76990000 - 64512 bytes - 4ddb887d - file date is 5/24/2011 03:40:06
    C:\Windows\syswow64\iertutil.dll   , loaded at 0x769b0000 - 1793024 bytes - 4fb57b3c - file date is 5/17/2012 15:27:20
    C:\Windows\syswow64\WINTRUST.dll   , loaded at 0x76b70000 - 172544 bytes - 4f4f094d - file date is 2/29/2012 22:37:42
    C:\Windows\syswow64\CLBCatQ.DLL    , loaded at 0x76c00000 - 522240 bytes - 4a5bd9b1 - file date is 7/13/2009 18:15:04
    C:\Windows\syswow64\CRYPT32.dll    , loaded at 0x76c90000 - 1154048 bytes - 4ce7b841 - file date is 11/20/2010 20:24:00
    C:\Windows\SysWOW64\sechost.dll    , loaded at 0x76db0000 - 92160 bytes - 4a5bdb04 - file date is 7/13/2009 18:16:14
    C:\Windows\syswow64\urlmon.dll     , loaded at 0x76dd0000 - 1103872 bytes - 4fb57d4a - file date is 5/17/2012 15:36:08
    C:\Windows\syswow64\KERNELBASE.dll , loaded at 0x76ef0000 - 272384 bytes - 4e211319 - file date is 7/15/2011 21:24:24
    C:\Windows\syswow64\LPK.dll        , loaded at 0x76f40000 - 25600 bytes - 4a5bdb3b - file date is 7/13/2009 18:11:24
    C:\Windows\syswow64\oleaut32.dll   , loaded at 0x76fd0000 - 571904 bytes - 4e58702a - file date is 8/26/2011 21:26:28
    C:\Windows\syswow64\MSCTF.dll      , loaded at 0x77060000 - 828928 bytes - 4a5bda69 - file date is 7/13/2009 18:15:44
    C:\Windows\system32\IMM32.DLL      , loaded at 0x77130000 - 119808 bytes - 4ce7ba53 - file date is 11/20/2010 20:24:26
    C:\Windows\syswow64\PSAPI.DLL      , loaded at 0x77a20000 -  6144 bytes - 4a5bdace - file date is 7/13/2009 18:16:14
    C:\Windows\SysWOW64\ntdll.dll      , loaded at 0x77a50000 - 1292080 bytes - 4ec49b8f - file date is 11/16/2011 22:38:40
    C:\Program Files (x86)\Sierra\Homeworld2\Bin\Release\MSVCR70.dll, loaded at 0x7c000000 - 344064 bytes - 3c36e574 - file date is 8/14/2003 18:08:58
    i know i have future questions to ask but for now i am focusing on trying to get this to at LEAST load the level.
    You guide did help though but it is still hard when you have never done scripting before.
    Your guide did say to read the "Making a Keeper a Playable Race" for a good idea on what to do so now that i have finished your guide i will go read that one. Maybe i will have fixed this problem without help~

    Edit: Bwahaha, i feel like a pro. I already knew everything from the "Making the Keeper a playable race" guide (up until the classdef/AI stuff. Havent started on any of that yet anyways)

    i have enough stuff here to make my own race. Too bad all the models are shared from the Hiigaran (and one Vaygr) or i would. Oh well the Hiigaran's are replaced anyways~

    It did not help me solve the problem but i will keep trying and post if i have solved it x3

    Edit Again: Ok it did help me design a new race in the drop down menu which doesn't help me but is still cool/nice to have xD

    Edit Again Again: Ok so i am distracted with making a new race. Anyways i decided to post a snapshot of the flagship my friend will have (it's damage is insane, i know, but i haven't put much time in testing anything. So, despite the fact its all more of an inside joke and no one would get the humor i make make the mod public just for opinions on what should be nerfed/buffed/left alone).
    http://i107.photobucket.com/albums/m...12/ss00041.jpg
    Last edited by LennethValkyrie; 21st Jun 12 at 5:17 PM.

  6. #6
    Ok so it turns out i horribly messed up on the game rules and that is why it would not load (i tried too soon to introduce my own custom elements before i knew exactly what to do x3)
    Event scenes wouldn't work out so i guess i will have to tamper with those too.
    oh gawd my head hurts z.z;;

    Edit: At least the level will load now

    Edit Again: So i cannot build anything, my flagship will not appear out of hyperspace (like how the hiigaran mothership appears in the campaigns with everything), teamcolours will not display proper colors and my head wont stop hurting so I'm going to take pain reliever and call it quits early for tonight xD

    Here is my files for review. I used the "build a scout" example from the tutorial as my objective just for testing purposes. I'm also using the mod I'm making for myself and not my friends since i just so happen to have a .level file in multiplayer already made just for placement practice with ships/asteroids/clouds/ect...
    Teamcolour:
    Code:
    teamcolours = { [0] = { {  (Black) 0.0, 0.0, 0.0, }, { (White) 255.0, 255.0, 255.0, }, "DATA:badges""/kiith naabal.tga",
    teamcolours = { [1] = { {  (Blue) 50.0, 230.0, 255.0, }, { (White) 255.0, 255.0, 255.0, }, "DATA:badges""/HIIGARAN.tga",
    teamcolours = { [2] = { {  (Red) 255.0, 0.0, 0.0, }, { (White) 255.0, 255.0, 255.0, }, "DATA:badges""/HIIGARAN.tga",
    teamcolours = { [3] = { {  (Red) 255.0, 0.0, 0.0, }, { (Grey) 150.0, 150.0, 150.0, }, "DATA:badges""/VAYGR.tga",
    teamcolours = { [4] = { {  (Red) 255.0, 0.0, 0.0, }, { (Black) 0.0, 0.0, 0.0, }, "DATA:badges""/VAYGR.tga",
    teamcolours = { [5] = { {  (Red) 255.0, 0.0, 0.0, }, { (Grey) 150.0, 150.0, 150.0, }, "DATA:badges""/VAYGR.tga",
    M01.lua
    Code:
    dofilepath("Data:scripts\\SCAR\\SCAR_Util.lua")
    
    obj_prim_newobj_id = 0
    
    function OnInit()
    Rule_Add("Rule_Init")
    
    end
    
    function Rule_Init()
    Event_Start( "IntelEvent_Intro" )
    
    SobGroup_ExitHyperSpace ("MotherShip", "Mothership_EnterVolume")
    
    Rule_Add( "Rule_Player_Wins" )
    
    Rule_Remove( "Rule_Init" )
    end
    
    function Rule_Player_Wins()
    -- Checks to see if the player has a squadron of Scouts
    if (Player_GetNumberOfSquadronsOfTypeAwakeOrSleeping( 0, "vgr_scout" ) ) > 0 then
    -- Updates the objective
    Objective_SetState( obj_prim_newobj_id, OS_Complete )
    
    -- Removes the rule
    setMissionComplete( 1 )
    end
    end
    
    	
    Events = {}
    
    Events.IntelEvent_Intro =
    {
    {
    { "Sound_EnableAllSpeech( 1 )", }, 
    { "Sound_EnterIntelEvent()", },
    { "Universe_EnableSkip(1)", }, 
    HW2_LocationCardEvent( "Postmortem Tutorial", 5 ), }, 
    { HW2_Letterbox( 1 ), HW2_Wait( 2 ), }, 
    { HW2_SubTitleEvent( Actor_FleetCommand, "Welcome to my test mission", 5 ), }, 
    { HW2_Wait( 1 ), }, 
    { { "obj_prim_newobj_id = Objective_Add( 'Defend the Base', OT_Primary )", },
    { "Objective_AddDescription( obj_prim_newobj_id, 'Do not engage the enemy unless engaged. Leave the Hiigarans to their fate')", }, 
    HW2_SubTitleEvent( Actor_FleetIntel, "The Vaygr have begun an all out war on the Hiigaran's.", 5 ), 
    {
            HW2_Wait(1),
        },
    HW2_SubTitleEvent( Actor_FleetIntel, "A stranded colony of Hiigaran's have been located to the northeast.", 6 ), 
    {
            HW2_Wait(1),
        },
    HW2_SubTitleEvent( Actor_FleetIntel, "A large gathering of Vaygr Advance Fleets have been located to the northwest.", 6 ), 
    {
            HW2_Wait(1),
        },
    HW2_SubTitleEvent( Actor_FleetIntel, "Several Hiigaran Defectors have joined the Vaygr.", 5 ), 
    {
            HW2_Wait(1),
        },
    HW2_SubTitleEvent( Actor_FleetIntel, "This is Wolf. Stand down and remain on the defensive. This is not our war.", 6 ), 
    {
            HW2_Wait(1),
        },
    HW2_SubTitleEvent( Actor_FleetIntel, "All units remain on guard and stay on the patrol.", 4 ), 
    
    }, 
    { HW2_Wait( 1 ), }, { HW2_Letterbox( 0 ), HW2_Wait( 2 ), { "Universe_EnableSkip(0)", },
    { "Sound_ExitIntelEvent()", }, }, }
    Datafiles.lua (the .dat the .lua points to is empty right now, not sure what it is suppose to be for at the moment. Still figuring out what this "Scar" thing is)
    Code:
    ##Dictionaries = { { name = "locale:campaign\\ascension\\m01\\m01.dat", }, }##
    M01.level (not the entire thing. Just the two lines i figured i needed to make a custom mothership by adding a different ship to the SOBgroup)
    Code:
      createSOBGroup("MotherShip")
      addToSOBGroup("Vgr_Wolf_Flagship", "MotherShip")
    Lastly, the Campaign file (campaign name is still up for debate >_>)
    Code:
    displayName = "The Rogue Named Wolf"
    Mission = {}
    
    Mission[1] =
    {
    
    directory = "M01",
    
    level = "M01.level",
    
    postlevel = function ( bWin )
    if bWin == 1 then
    postLevelComplete()
    end
    end,
    
    
    displayName = "Departure",
    
    description = "Wolf and his followers see the war between Hiigara and the Vagyr begin and decide that this battle is part of a bigger picture.",
    }
    
    Mission[2] =
    {
    directory = "M02",
    level = "M02.level",
    postlevel = function ()
    postLevelComplete()
    end,
    displayName = "Hiigara Under Siege",
    description = "Wolf comes out of hyperspace to see the Hiigaran Homeworld is being bombarded and decides he must help relieve pressure off of the population.",
    }
    And yeah..Wolf from starfox. Kind of hawt ;3 Me and my friend are both fans lawl
    anyways (ignore the fangirling), if i can get this to work then i know i can get the original mod to work (which just needs the one campaign mission and maybe some AI scripting to be finally completed z.z)
    I think i am doing good for someone with no prior experience.
    Last edited by LennethValkyrie; 21st Jun 12 at 6:38 PM.

  7. #7
    Member Chimas's Avatar
    Join Date
    Jun 2012
    Location
    now watching c-beams glitter in the dark near Tannhäuser Gate

    Team Colors

    Yesterday I was dealing with team colors for the stock campaign and got a lot of ghosts on my screen. I didn't understand what went wrong in the first moment.
    Then I've observed the numbers and they were resembling coefficients (between zero and one) instead of RGB numbers. So coeficients are percentages! To test my perception I got one of my profile colors and divided by 255 all three RGB numbers for BASE and STRIPE.

    This is my mistake taken from PLAYERCFG inside the BIN/PROFILES
    Code:
      taskbar = 1,  emblem = "PROFILES:badges/RG.TGA",  stripecolour = { 255, 63, 41, }, teamcolour = { 19, 77, 117, },
    Idea is
    255/255 = 1
    63/255=0.25
    41/255=0.16

    This is the solution
    Code:
    teamcolours = {
        [0] = {{0.07, 0.3, 0.46}, {1, 0.25, 0.16} , "DATA:Badges/RG.tga", {0.365, 0.553, 0.667}, "data:/effect/trails/hgn_trail_clr.tga"},
    Things to note:
    - in the tutorial here in relic forum, there's no mention of this color calculation. If allowed, I put it there too, don't wanna bump the thread
    - the positioning of base and stripe color codes are INVERTED, but I've made it wrong in the first trial
    -I suspect that "1" and "0" don't need the dot, it's working


    This is the result for M1.
    https://www.sugarsync.com/pf/D7835780_65540047_798674
    https://www.sugarsync.com/pf/D7835780_65540047_798672
    (these links won't stay longer than a few days)

    I'm practicing all this modding thing by making small *.BIG files at a time.
    If you deal with a lot of stuff with different nature, one mistake and you're down.

  8. #8
    Member Dim@'s Avatar
    Join Date
    Jul 2007
    Location
    Battlecruiser complete
    Lol, this is ridiculously predictable.
    Like every other newbie, myself included, you have posted the wrong log.
    I gave the exact filename. "Hw2.log". Not the something-something-date-log.txt file.

    Have a look at that. If you continue having problems, then post again.

  9. #9
    in my Homeworld2/Bin/Release there is no Hw2.log, Dim.
    since i couldn't find it i assumed you meant the something-something-date-log.text
    so....sorry.

    and ok Chimas, i shall try that out~

    Edit: I did a file search in the HW2 directory just to be sure and nope, no results for "Hw2.log"

    Edit Again: Hmm, so odd. I can get the teamcolours to work now thanks to you Chimas but it only works with just the human player (player 0) assigned. As soon as i begin adding player 1, 2...5, it goes back to the generic, light blue color on my fleet. I'll keep comparing my coding to the PLAYERCFG file you pointed out to see what i am doing wrong

    Code:
    teamcolours = {
        [0] = {{0, 0, 0}, {1, 1, 1} , "DATA:Badges/kiith soban.tga"},
    	},
    teamcolours = {
    	[1] = {{0.19, 0.9, 1}, {1, 1, 1} , "DATA:Badges/Hiigaran.tga"},
    	},
    teamcolours = {
    	[2] = {{1, 0, 0}, {1, 1, 1} , "DATA:Badges/Hiigaran.tga"},
    	},
    teamcolours = {
    	[3] = {{1, 0, 0}, {0.6, 0.6, 0.6} , "DATA:Badges/Vaygr.tga"},
    	},
    teamcolours = {
    	[4] = {{1, 0, 0}, {0, 0, 0} , "DATA:Badges/Vaygr.tga"},
    	},
    teamcolours = {
    	[5] = {{1, 0, 0}, {0.5, 0.5, 0.5} , "DATA:Badges/Vaygr.tga"},
    	},
    Last edited by LennethValkyrie; 22nd Jun 12 at 10:44 AM.

  10. #10
    Member Chimas's Avatar
    Join Date
    Jun 2012
    Location
    now watching c-beams glitter in the dark near Tannhäuser Gate
    1) Are you talking about Single or Multi Player mode? I'm just talking about single;

    2) If you open the Ascension campaign, for every level from 1 to 15 you have a file called TEAMCOLORS.LUA. In another thread, I've read them commenting on a script for all levels in one file, but I haven't tried it yet;

    3) From what I could have perceived about HW2, it's common to have changes made in 2 or 3 different files to make 01 feature works. Take it as a principle to avoid these odd things, it's never too easy, unless you're experienced. Since I'm not experienced, I'm always reading things twice.

  11. #11
    I do mean singleplayer o:

    Edit: I just installed v1.1 since i forgot to do it last night after reading Dim's tutorial and after troubleshooting and fixing a problem where hw2 would no longer start up it seems the problem still wants to persist. The code looks correct every time i look at it but it has to be something simple i am over looking z.z

    Edit: Wait might have found the problem xD

    Edit: Nope, nevermind z.z
    in fact the patch update made it worse. Now it wont even work with just the 0 player team colour assigned.

    ----------

    Finally! Can't believe i didnt think of it z.z
    It works now. This is the way i did it.
    Code:
    teamcolours = {
        [0] = {{0, 0, 0}, {1, 1, 1} , "DATA:Badges/kiith soban.tga"},	
    	[1] = {{0.19, 0.9, 1}, {1, 1, 1} , "DATA:Badges/Hiigaran.tga"},
    	[2] = {{1, 0, 0}, {1, 1, 1} , "DATA:Badges/Hiigaran.tga"},
    	[3] = {{1, 0, 0}, {0.6, 0.6, 0.6} , "DATA:Badges/Vaygr.tga"},
    	[4] = {{1, 0, 0}, {0, 0, 0} , "DATA:Badges/Vaygr.tga"},
    	[5] = {{1, 0, 0}, {0.5, 0.5, 0.5} , "DATA:Badges/Vaygr.tga"},
    	}
    I feel like a moron. I think i need a break from slaving over this mod lawl
    But so close, can't stop now!

    ----------

    Whew, time for the hard part then. Thanks to Dim's guide and comparing files I'm starting to get an idea of what to do but for now i am going to continue figuring them out with old fashion trial and error. Otherwise i would be bombarding you two with questions lawl

    Edit: I think i figured out why i cannot build anything. I am trying to run the campaign from the Vaygr point of view (since my friend wanted the Hiigaran ships for the laserbeams and the one i want to make will be using Vagyr ships as the main thing) is there anyway to change that or am i stuck renaming all the .ship.subs.wepn files/folders/filepaths?
    Last edited by LennethValkyrie; 22nd Jun 12 at 2:50 PM.

  12. #12
    You may be able to get away with just swapping the vaygr and hig entries in the race definition file.
    Co-founder of Homeworld:@
    Open to new members

  13. #13
    wow, nice trick. It worked.
    Thanks Siber :3
    I can build now as Vaygr~
    Not that i need it for the mod for my friend but i will for mine 8D
    Last edited by LennethValkyrie; 22nd Jun 12 at 3:51 PM.

  14. #14
    Member Dim@'s Avatar
    Join Date
    Jul 2007
    Location
    Battlecruiser complete
    You can only build from ships that have the same race prefix as your race.
    That is, a Vaygr player can only build from "VGR_" ships, and so on.

  15. #15
    Ah, ok then.
    *Currently taking a break from this and just designing the single map i will need for my friends mod z.z*

  16. #16
    Ok so this is what i suspect (bear in mind this probably the basics of the basics for you two):
    I noticed this (not for the first time, of course!) in the tanis .level file.
    Code:
    addSquadron("Vgr_HyperSpace_Platform3", "Vgr_HyperSpace_Platform",
    the first part..."Vgr_HyperSpace_Platform3" has to do with SOBGrouping. I always thought you had to keep both entries the same...
    for example..
    Code:
    addSquadron("Vgr_HyperSpace_Platform", "Vgr_HyperSpace_Platform",
    anyways im learning...slowly but surely lol

    Im still just trying to get the SOBGroup for the flagship to work z.z
    i almost achieved it...but it somehow doubled the size of the map from 40km radius (80km diameter) to 80km radius (160km diamater) but im getting closer xD
    at least my friends b-day isn't until the 22nd of August so i have plenty of time to get the hang of this.

  17. #17
    Ok after using my newly gained knowledge and some more searching i attempted to try creating a simple SOBGroup with the flagship in it but the game crashed.
    Also i decided to check for a log file again since i updated to v1.1 and hooray, it created one now
    So I'm sure Dim@ will be happy ^^
    Code:
    Sat Jun 23 15:44:28 2012
     Loaded Archive: 'Homeworld2.big' 
     Loaded Archive: 'english.big' 
     Uing ..profiles\ for profiles folder 
     GAME -- Using player profile Wolf 
     Changing from a 32 bit colour depth in winNT (6.1 build 7601), Service Pack 1 
     Using ATI Technologies Inc.'s 4.1.10825 Compatibility Profile Context AMD Radeon HD 6320 Graphics  renderer (Suspected driver is atioglxx.dll 6.14.10.10825) 
     Loaded Archive: 'englishSpeech.big' 
     Loaded Archive: 'Music.big' 
     SOUND -- created destination [ fdaudio ], handle [ 4 ] with [ 48 ] channels created 
     SOUND -- created destination [ fda streamer ], handle [ 5 ] with [ 8 ] channels created 
     Build name: The Dust Wars  - AutoBuild3569 - Ordered by smmatte 
     Built by  : mrbuild 
     Data path : C:\Program Files (x86)\Sierra\Homeworld2\data 
     Resetting fp control word. 
     CmdLine: -overrideBigFile 
     thumbnail Data:UI\MapThumbnails\Campaign\ascension\M01.tga does not exist for this tutorial 
     thumbnail Data:UI\MapThumbnails\Campaign\ascension\M01.tga does not exist for this tutorial 
     Starting Level: Data:\LevelData\Campaign\ascension\M01\M01.level 
     LUA 'data:Ship\HGN_KAABI_FLAGSHIP\HGN_KAABI_FLAGSHIP.events' -- parameter: attempt to call global `StartShipConfig' (a nil value)
    stack traceback:
       1:  main of string "" at line 6
    `StartShipConfig' (a nil value) makes no sense considering the ship works just fine without being added to a SOBGroup x.x

    also i found more tutorial sites...full of dead links (even a a singleplayer template to help .lua deficient people like me xP)
    what evillejedi said in one of his topics is right. Everythings too spread out or suffers from dead links to be helpful to anyone z.z''
    so i narrowed down what i want to do with this single mission to something simpler than i originally planned...just a generic subtitle event and a gamerule. That's it for now e.e
    maybe more if i can actually get the hang of this.
    also, Booo! Evillejedis solar system planets for background planets like Hiigara in mission 15 is a dead link too.
    Last edited by LennethValkyrie; 23rd Jun 12 at 3:59 PM.

  18. #18
    Member Dim@'s Avatar
    Join Date
    Jul 2007
    Location
    Battlecruiser complete
    That error refers to a problem in your
    HGN_KAABI_FLAGSHIP.events file.
    StartShipConfig is a line normally added to *.ship files.

  19. #19
    ...
    so at somepoint, will editing the .ship file, i accidently saved it as the .events file
    -slams face into desk-
    so i replaced it with the original battlecruiser events file (and renamed it of course)
    however the game still crashed at load level. Turns out my SOBGroup didn't work.
    z.z
    back to the drawing board.

    My Logfile just encase you wanted to see it. Oddly enough it says something about Rule_Init in the .lua file being whats wrong but the game only crashes when i attempt a SOBGroup. Why does this have to be so confusing!

    Code:
    Sat Jun 23 18:47:49 2012
     Loaded Archive: 'Homeworld2.big' 
     Loaded Archive: 'english.big' 
     Uing ..profiles\ for profiles folder 
     GAME -- Using player profile Wolf 
     Changing from a 32 bit colour depth in winNT (6.1 build 7601), Service Pack 1 
     Using ATI Technologies Inc.'s 4.1.10825 Compatibility Profile Context AMD Radeon HD 6320 Graphics  renderer (Suspected driver is atioglxx.dll 6.14.10.10825) 
     Loaded Archive: 'englishSpeech.big' 
     Loaded Archive: 'Music.big' 
     SOUND -- created destination [ fdaudio ], handle [ 4 ] with [ 48 ] channels created 
     SOUND -- created destination [ fda streamer ], handle [ 5 ] with [ 8 ] channels created 
     Build name: The Dust Wars  - AutoBuild3569 - Ordered by smmatte 
     Built by  : mrbuild 
     Data path : C:\Program Files (x86)\Sierra\Homeworld2\data 
     Resetting fp control word. 
     CmdLine: -overrideBigFile 
     thumbnail Data:UI\MapThumbnails\Campaign\ascension\M01.tga does not exist for this tutorial 
     thumbnail Data:UI\MapThumbnails\Campaign\ascension\M01.tga does not exist for this tutorial 
     Starting Level: Data:\LevelData\Campaign\ascension\M01\M01.level 
     parameter: attempt to index global `newTable' (a nil value)
    stack traceback:
       1:  function `HW2_LocationCardEvent' at line 20 [string ""]
       2:  main of string "" at line 42 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""] 
     parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
       1:  function `Rule_Init' at line 11 [string ""]

  20. #20
    Member Dim@'s Avatar
    Join Date
    Jul 2007
    Location
    Battlecruiser complete
    The log tells you everything that's wrong.
    There are two errors there:

    Code:
    parameter: attempt to index global `newTable' (a nil value)
    stack traceback:
    1:  function `HW2_LocationCardEvent' at line 20 [string ""]
    2:  main of string "" at line 42
    Code:
    parameter: attempt to call global `Event_Start' (a nil value)
    stack traceback:
    1:  function `Rule_Init' at line 11 [string ""]
    If you are going to get into scripting, you will become familiar with these.
    The first line tells you what the error is.

    In this case, "newTable" is undefined at one point, and "Event_Start" is undefined at another. The second error repeats because the game attempts to run that part of the script over and over again.
    The next lines tell you what line of the code the error is found.
    The first error is found at line 20 in the function HW2_LocationCardEvent (which ... and this is actually quite strange, this is found in the file scripts\scar\scar_util.lua, and it shouldn't give you this error. Can you post the first few lines of that file?). This function is called from line 42 of your script file. You can try commenting out that line for now. And btw, have you by any chance created a variable named "newTable"?
    The second error, which seems more serious, is found at line 11 of your script file. The game says it has no idea what you mean by "Event_Start". You are probably using it incorrectly, but I can't say anymore by looking at only the log file. If it's not important, you can try commenting that line out and seeing if you get any other errors. This is a serious error because the script aborts every time it reaches that line, and nothing after it ever gets run.

  21. #21
    well i used the guide at the wiki as a template since the actual SP Template has a broken download link so that is probably why. I realized, after Chimas helped me with the teamcolours, whoever did the coding on the wiki examples are either wrong or just not meant to be used as a template so that shouldve been my hint not to try it ^^;;

    I'm not sure what lines you want from the scar file but the LocationCardEvent i am using from the examples that were given is...
    Code:
    HW2_LocationCardEvent( "Postmortem Tutorial", 5 ), },
    As for the error at line 20, this is what i have (i used mission1 from HW2 as sort of the example but mostly the wiki example. The mission.lua files for the actual game seem pretty random at times z.z)
    Code:
    function Rule_Init()
    Event_Start( "IntelEvent_Intro" )
    
    createSOBGroup("MotherShip")
    addToSOBGroup("Hgn_Kaabi_Flagship", "MotherShip")
    SobGroup_ExitHyperSpace ("MotherShip", "Mothership_EnterVolume")
    
    Rule_Add( "Rule_Player_Wins" )
    
    Rule_Remove( "Rule_Init" )
    end
    line 20 is where it says 'ends' so i assume it means the entire function.

    The line 11 error is also taken from the example on the wiki site. It also happens to be the function i just posted with the line 20 error. Line 11 is the Event_Start.

    As for the newtable error...and i had to do a google search to understand what a table is in lua...seems to be pointing at the events section where i tried to add the generic subtitle events before the mission starts.

    Code:
    Events = {}
    
    Events.IntelEvent_Intro =
    {
    {
    { "Sound_EnableAllSpeech( 1 )", }, 
    { "Sound_EnterIntelEvent()", },
    { "Universe_EnableSkip(1)", }, 
    HW2_LocationCardEvent( "Postmortem Tutorial", 5 ), }, 
    { HW2_Letterbox( 1 ), HW2_Wait( 2 ), }, 
    { HW2_SubTitleEvent( Actor_FleetCommand, "Welcome to my test mission", 5 ), }, 
    { HW2_Wait( 1 ), }, 
    { { "obj_prim_newobj_id = Objective_Add( 'Testing Prim Objective', OT_Primary )", },
    { "Objective_AddDescription( obj_prim_newobj_id, 'Testing Objective Description')", }, 
    HW2_SubTitleEvent( Actor_FleetIntel, "Testing Speech.", 5 ), 
    }, 
    { HW2_Wait( 1 ), }, { HW2_Letterbox( 0 ), HW2_Wait( 2 ), { "Universe_EnableSkip(0)", },
    { "Sound_ExitIntelEvent()", }, }, }
    This was done almost exactly based on the example provided.

    Also is this what you mean by first few lines of the scar file?
    Code:
    function HW2_LocationCardEvent(text, time)
        newTable[1] = [[LocationCard("]]..text..[[",]]..time..")"
        newTable[2] = "LocationCard_IsDone()"
        return newTable
    end
    Also it seems the game stopped crashing when i replaced my new race...the one my friend will be playing...at the top of the list (since i forgot to keep it that way after Siber pointed that out)
    errors still persist though.
    Last edited by LennethValkyrie; 25th Jun 12 at 2:33 PM.

  22. #22
    Member Chimas's Avatar
    Join Date
    Jun 2012
    Location
    now watching c-beams glitter in the dark near Tannhäuser Gate
    Hi LennethValkyrie,

    There are 2 mods you should take a look for scripting:
    - The End of Times
    - PDS or point defense systems

    In TEOTS you'll find a demo, which is a small single-player mission. You can compare HW2 stock campaign with their scripting

    In PDS play (and consult later) the SCENARIOS mode in the opening menu. You'll probably find interesting scripting there too.

    Sds

  23. #23
    Member Dim@'s Avatar
    Join Date
    Jul 2007
    Location
    Battlecruiser complete
    As I suspected - your scar file has an error.
    It should read:

    Code:
    function HW2_LocationCardEvent( text, time)
            local newTable = {}
            newTable[1] = "LocationCard(\""..text.."\","..time..")";
            newTable[2] = "LocationCard_IsDone()";
            return newTable;
    end
    Try commenting out the line:
    Event_Start( "IntelEvent_Intro" )

    The event won't run, but see if the rest of your scripts do.
    I can't say any more without the rest of your file.

  24. #24
    K, i did.
    The gamerule example...build a scout to win...didnt work. Then it gave me an error about the SOB group i was trying to make in the function (i had it in th both the lua and level file since i noticed relic did that so i thought i was doing it right) aftre i removed it, the gamerules worked right so it cleared up that problem too. Objectives still wont display thoug. The function simply looks like this now:
    Code:
    function Rule_Init()
    
    Rule_Add( "Rule_Player_Wins" )
    
    Rule_Remove( "Rule_Init" )
    end
    However the log file still caught erros. In fact its another newtable error. Is there something wrong or out-of-date in my scar file? The entire scar file looks like it is missing detail based on what you showed me in your post.
    Code:
     parameter: attempt to index global `newTable' (a nil value)
    stack traceback:
       1:  function `HW2_Letterbox' at line 72 [string ""]
       2:  main of string "" at line 38
    Here is line 38
    Code:
    { HW2_Letterbox( 1 ), HW2_Wait( 2 ), },
    Also Chimas i downloaded those mods and they depressed me xD
    because i thought i was doing good with being able to add ion cannon turrets and extra misile launchers and stuff but then i saw PDS and felt like my MOD is total crap q.q
    Mostly because i never got the texture files to work right in the HOD without crashing the game (which isnt a big deal for me and is something i can look up when im adding finishing touches sometime).
    Seeing PDS makes me want to work harder on my MOD lawl

  25. #25
    Ok so i manually added the lines myself into the scar file based on what you showed me until there was no more errors. So i added back in the
    Event_Start( "IntelEvent_Intro" )
    and suddenly it crashes while loading ScarScripts because of...
    Code:
    SCAR ERROR: could not find OnInit function in rule file (Data:\LevelData\Campaign\ascension\M01\m01.lua) -- FATAL EXIT -- scar/223:!
    In fact, i see nothing in the scar file about the rule OnInit z.z;;

  26. #26
    Member Dim@'s Avatar
    Join Date
    Jul 2007
    Location
    Battlecruiser complete
    Does
    m01.lua contain an OnInit() function? Because if it doesn't it should, like all gamerules ...
    I would guess that you had it before but somehow broke it?

  27. #27
    yeah, it does.
    Code:
    function OnInit()
    Rule_Add("Rule_Init")
    Event_Start( "IntelEvent_Intro" )
    end
    Thinking i was suppose to put the event start somewhere else i tried up in the oninit but that didnt work either xD
    with the exception of the Event_Start i have not changed rule OnInit at all from the wiki tutorial.

  28. #28
    So out of curiosity, i loaded PDS mod and tried to run a campaign to see if it would work and it, too, crashed at loadscarscript for the same reason. I'm wondering if there is something wrong with my scar file which is odd because i have never modified it before you pointed out the missing lines of code...

  29. #29
    Alright, this convo was shifted to private messages for a while but my issues were solved thanks to Dim@!
    i ended up ditching campaign and making a custom multiplayer game type/game rules.
    Now onto AI...
    ...onto AI after like a week or two of forgetting about this MOD first because 15min into AI scripting i ran into an error that didn't even make sense so i just sort of said screw it for now 8D

  30. #30
    Member Chimas's Avatar
    Join Date
    Jun 2012
    Location
    now watching c-beams glitter in the dark near Tannhäuser Gate
    Hi, I'm not gonna make a new thread about and won't change the subject here too, so this is a small detour: look what COMPLEX are cooking up - HW2 IN A NEW ENGINE !!!!

    ===========================
    http://s1.directupload.net/file/d/2937/5nkssk8w_jpg.htm
    ===========================
    Source: New HW 2 Complex 9

    Tomorrow, people will get crazy around here

    \edit
    source published later
    Last edited by Chimas; 29th Jun 12 at 8:22 PM.

  31. #31
    where the hell did you find that! Thats is godly beyond wods.

  32. #32
    Member Chimas's Avatar
    Join Date
    Jun 2012
    Location
    now watching c-beams glitter in the dark near Tannhäuser Gate
    Let's make a thread "Relic Wake Up"? ehhehehehehhe ...

  33. #33
    holy cow, that does look sweet xD
    too bad im on HW2 vacation. Back to writing my novel for now and mostly ignoring HW2 lawl
    thanks for the post, Chimas ^^

  34. #34
    Member Dim@'s Avatar
    Join Date
    Jul 2007
    Location
    Battlecruiser complete
    Oh. My. God.
    And I was just about to leave HW2 for good ...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •