Jump to content

Help for CQ3 mod for Oblige 7.70


kinker31

Recommended Posts

What I'm trying to do to add support for Chex Quest 3 for Oblige 7.70 is to look for any modules that handle sounds, textures, names of monsters and whatnot, and replace what they're internally named as in Doom 1 with their Chex Quest 3 counterparts, since to the best of my knowledge, Chex Quest 3 is a modified version of Doom 1. However, I'm having quite a tough time finding out which script or file handles where which monsters get placed, how the textures work, how weapons/health/other pickups work, and whatnot, and I'm wondering if I have to make an entirely new game folder for the game, of if I could just add an/some addition theme(s) to the level being made.

 

Sorry if it seems I'm oblivious as to what I'm talking about, I'm just trying to get myself comfy with LUA.

Share this post


Link to post

I suggest adapting the existing Heretic game definition, it is simpler than Doom so there will be less things to modify and less extraneous details (e.g. for Doom there is stuff for handling both Doom 1 and Doom 2 as well as TNT and Plutonia).

 

First step is to create a complete copy of the games/heretic folder, including the fabs and data subfolders, e.g. call the new folder chex3 or so (inside the games folder). Or just rename the existing heretic folder to chex3, that would be easier -- it depends on whether you plan to use a git repository to manage your changes or not.  Anyway, everything you need to modify will be inside this folder.

 

Then you should go through all the main lua files and rename "heretic" to "chex3" everywhere, including uppercase stuff (i.e. change "HERETIC" to "CHEX3").  The file base.lua is the starting file which imports the other main lua files and defines the game definition.  There are lua files for prefabs too, but none of those mention heretic anywhere so you won't need to modify those.

 

After doing this, you should be able to start Oblige and have the game appear in the menu, and be able to build maps (though they will still be for Heretic, of course).  Any problems here should be fixed before you start to modify stuff for the new game.

 

I can help a little bit, but you're gonna have to figure out a lot of stuff on your own, and it will be a lot of work to get it finished.  But I wish you good luck :-)

 

 

Share this post


Link to post

Thanks! Also, is the new game that pops up on the list of games from Oblige's menu supposed to read "Heretic"? I tried to change it to something like "Chex Quest 3 [WIP]", but it didn't seem to show up.

 

EDIT: I should probably also mention this is the pk3 I managed to cnojure up by following your guide, hopefully it's enough to get me started.

chextest.7z

Edited by kinker31
file for chex test

Share this post


Link to post

A good start, but there are a few things to fix.

 

Firstly in base.lua there is this line:

OB_GAMES["heretic"] =

but that should have "chex3" instead of "heretic".

 

Secondly, in themes.lua there is the theme definition:

OB_THEMES["castle"] =
{
  label = _("Castle")
  game = "CHEX3"
  name_theme = "URBAN"
  mixed_prob = 50
}

the "CHEX3" in there should be lowercase.  It is important that the case matches exactly, "CHEX3" does not match "chex3" and that prevents the theme from being used (and Oblige cannot work without any themes).

 

Thirdly, the theme name is "castle" but this will conflict with the Heretic theme name, so it needs to be changed.  First place to change it is right here, e.g. call it "city".  It must be changed in some other places too, look for castle in levels.lua and themes.lua -- for the themes you need to change stuff like "castle_Green" to "city_Green" (the prefix must match the theme name and it must be one word with an underscore in the middle).

 

After these changes, you should be able to build some maps, and then you can begin making modifications to other definitions and the prefabs.  If you cannot build maps yet, then let me know.

Share this post


Link to post

I was able to get Oblige to recognize Chex Quest and it's theme (Chexopolis), which seems to be a pretyt good start.... but unfortunately a "script error: assertion failed" error stopped me from actually building levels.

Edited by kinker31

Share this post


Link to post

Oblige always creates a file called LOGS.txt and more information about the error should be in there.  Copy and paste the contents into a post here and I'll take a look.

Share this post


Link to post
Spoiler

====== START OF OBLIGE LOGS ======

********************************************************
** OBLIGE Level Maker 7.70 (C) 2006-2017 Andrew Apted **
********************************************************

Library versions: FLTK 1.3.3

   home_dir: C:\Users\Donovan\Downloads\ROMs, Emulators, and Game Tools\Oblige-7.70
install_dir: C:\Users\Donovan\Downloads\ROMs, Emulators, and Game Tools\Oblige-7.70
config_file: C:\Users\Donovan\Downloads\ROMs, Emulators, and Game Tools\Oblige-7.70/CONFIG.txt

Loading language list: C:\Users\Donovan\Downloads\ROMs, Emulators, and Game Tools\Oblige-7.70/language/LANGS.txt
DONE.

Loading options file: C:\Users\Donovan\Downloads\ROMs, Emulators, and Game Tools\Oblige-7.70/OPTIONS.txt
DONE.

Detected user language: 'en'
Using the default language (English)

Initializing VFS...
DONE.

Scanning for addons....
  found: chextest.pk3 (Enabled)
  using: chextest.pk3
  found: no_hang_lamp.pk3 (Disabled)
DONE


--- OPENING LUA VM ---

Loading main script: oblige.lua
DONE.

~~ Oblige Lua initialization begun ~~

Loading all games...
Loading all engines...
Loading all modules...

~~ Completed Lua initialization ~~

Loading config file: C:\Users\Donovan\Downloads\ROMs, Emulators, and Game Tools\Oblige-7.70/CONFIG.txt
DONE.

Saving config file...
DONE.

Created WAD file: C:\Users\Donovan\Downloads\Games\GZDoom\chextest1.wad


~~~~~~~ Making Levels ~~~~~~~

seed = 2104646473

---- Game Settings ----

game = chex3
engine = gzdoom
length = single
theme = city

---- Architecture ----

size = regular
outdoors = mixed
caves = mixed
liquids = none
hallways = mixed
teleporters = none
steepness = mixed

---- Monsters ----

mons = normal
strength = medium
ramp_up = medium
bosses = medium
traps = none
cages = none

---- Pickups ----

health = heaps
ammo = heaps
weapons = normal
items = normal
secrets = none

---- Other Modules ----

@export_map = 0

@misc = 1
  pistol_starts = no
  alt_starts = no
  big_rooms = mixed
  parks = none
  windows = none
  symmetry = mixed
  darkness = none
  mon_variety = heaps
  barrels = some
  doors = mixed
  keys = rare
  switches = none

@small_spiderdemon = 1

-- END --
Loading prefabs from: 'games/chex3/fabs'
OK

****** ERROR OCCURRED ******

Stack Trace:
  1: c-function assert()
  2: func() @ levels.lua:80
  3: ob_invoke_hook() @ oblige.lua:1145
  4: Level_make_all() @ level.lua:2366
  5: ob_build_cool_shit() @ oblige.lua:1269

Script Error: assertion failed!

Writing WAD directory
Closed WAD file

 

Share this post


Link to post

I think that error occurs because you removed "episode4" and "episode5" from the EPISODES table in levels.lua -- while it makes sense to remove them, the code in the get_levels() function assumes 5 episodes and so an error occurs.

 

That code has to be updated for the change from 5 to 3 episodes.  There are two lines which need fixing, both in levels.lua :

local EP_NUM  = sel(OB_CONFIG.length == "game",   5, 1)

and :

for ep_index = 1,5 do

 

Share this post


Link to post

BTW, the following is some old CQ3 definitions which never got used, but may contain some useful stuff.  I think the MATERIALS and ENTITIES tables could be used as-is, and the MONSTERS, WEAPONS and PICKUPS tables could be used with some extra changes.  You would need to cut and paste the definitions into the proper files, like materials.lua and entities.lua (etc).  Most of the other stuff won't work in Oblige 7.70.

old-chex3-stuff.7z

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...