Author Topic: Smoke's Modding Guide  (Read 77980 times)

Offline BehemothProgrammer

  • Endtrail
  • ****
  • Posts: 224
  • T:REP 791
    • View Profile
Re: Smoke's Modding Guide
« Reply #50 on: March 13, 2019, 04:54:56 PM »
yup that's what will happen. Just have to declare a kActor@ named instigator before $restart in that example.
Turok 2 Co-Op Mod

QTurok | Turok: Mountain of the Sun | WolfenTurok 3D | and more...

Offline BehemothProgrammer

  • Endtrail
  • ****
  • Posts: 224
  • T:REP 791
    • View Profile
Re: Smoke's Modding Guide
« Reply #51 on: March 13, 2019, 06:51:06 PM »
More stuff.

AAF_EVENTSOUND - (must be paired with AAF_EVENT) arg2(in editor) is to be set to the soundID defined in defs/fileLookup.txt. When the player enters the area that sound will play. Be careful though, the event in arg4 will also be executed.

-----World-----
void FloodFillAreaFlags(  int sector, uint flags, bool bSet ) - DO NOT USE!!! (Use FloodMatchingAreaFlags instead) This can only turn OFF area flags. If you attempt to turn ON any flag while that flag is already ON for that sector/area, the game will crash.

void ChangeAreaFlag( int areaID, uint flags, bool bSet ) - DO NOT USE!!! (Use FloodMatchingAreaFlags instead) Only certain flags work correctly when set. The full list of my tests is:
Code: [Select]
AAF_WATER = 1 << 0 //works, partially. No shallow water sound effects play.
AAF_BLOCK = 1 << 1 //does NOT work
AAF_TOGGLE = 1 << 2 //
AAF_CLIFF = 1 << 3 //does NOT work
AAF_CLIMB = 1 << 4 //does NOT work
AAF_ONESIDED = 1 << 5 //(Bridge) does NOT work
AAF_CEILING = 1 << 6 //does NOT work
AAF_CRAWL = 1 << 7 //works
AAF_ENTERCRAWL = 1 << 8 //works
AAF_HIDDEN = 1 << 9 //works
AAF_ENTERED = 1 << 10 //
AAF_SECRET = 1 << 11, //works
AAF_RESTRICTED = 1 << 12 //works
AAF_SLOPETEST = 1 << 13 //does NOT work
AAF_DEATHPIT = 1 << 14 //works
AAF_MAPPED = 1 << 15 //does NOT work
AAF_EVENT = 1 << 16 //works
AAF_REPEATABLE = 1 << 17 //
AAF_TELEPORT = 1 << 18 //works
AAF_DAMAGE = 1 << 19 //works
AAF_DRAWSKY = 1 << 20 //works
AAF_TELEPORTAIR = 1 << 21 //works
AAF_LAVA = 1 << 22 //works
AAF_EVENTSOUND = 1 << 23 //works
AAF_ANTIGRAVITY = 1 << 24 //works
AAF_LADDER = 1 << 25 //works
AAF_CHECKPOINT = 1 << 26 //works
AAF_SAVEGAME = 1 << 27 //works
AAF_WARPRETURN = 1 << 28 //
AAF_SHALLOWWATER = 1 << 29 //works
AAF_DRAWSUN = 1 << 30 //works
AAF_STOREWARPRETURN = 1 << 31 //


void FloodMatchingAreaFlags( int sector, uint flags, bool bSet )
void FloodFillAreaFlags( kVec3& loc, uint flags, bool bSet )

both work for all flags so use these instead.

« Last Edit: March 13, 2019, 06:58:01 PM by BehemothProgrammer »
Turok 2 Co-Op Mod

QTurok | Turok: Mountain of the Sun | WolfenTurok 3D | and more...

Offline Smoke39

  • Endtrail
  • ****
  • Posts: 202
  • T:REP 597
    • View Profile
Re: Smoke's Modding Guide
« Reply #52 on: March 14, 2019, 03:06:22 AM »
Did some more testing and found some quirks with $script 0.  Made a new level scripts section, and updated kGame::CallDelayedMapScript().  I'm not going out of my way to verbosely spell out all the preprocessor stuff with examples 'n' such since I think it's kind of academic, but I think I've got all the basic info there.

Thanks for the area flags stuff.  Those function issues are pretty big; I'll probably try to take care of them soon.

Offline Smoke39

  • Endtrail
  • ****
  • Posts: 202
  • T:REP 597
    • View Profile
Re: Smoke's Modding Guide
« Reply #53 on: April 19, 2019, 09:11:13 PM »
Added a new tutorial on updating Steam Workshop items when the editor insists on only creating new ones, since it's a recurring issue people keep running into.  Hope it helps.

Offline Smoke39

  • Endtrail
  • ****
  • Posts: 202
  • T:REP 597
    • View Profile
Re: Smoke's Modding Guide
« Reply #54 on: August 23, 2019, 03:03:56 AM »
Added info on the Teleport Avoid Cliffs flag to the Levels section.  While it does do what the name implies, BehemothProgrammer discovered that it also makes enemies vulnerable to super arrows.

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal