Recent Posts

Pages: 1 [2] 3 4 ... 10
Computers & Programming General / Re: SVN -> Git Conversions
« Last post by Vagabond on December 07, 2017, 01:13:34 AM »

Thank you for uploading HFL.

I think the last prerequsitie my scenarios take is Outpost2Dialog. This project is basically odasl and a sample of how to create a dialog box at the beginning of a scenario. It also shows how to set/fetch resources to feed the dialog box a message.

I'm not sure how I feel about this project. odasl is used in a lot of scenarios, so it shouldn't be included separately in them all. But, maybe it makes more sense to place it in Outpost2DLL or somewhere else as opposed to being a separate project. I don't know?

The number of projects included on GitHub is starting to grow quite a bit. :)

Outpost 2 Update / Re: Allowing Outpost2 to load any vol file (*.vol)
« Last post by Vagabond on December 07, 2017, 01:03:47 AM »
After saying there would be no time for major updates until January, I found some time. Life is funny like that. :)

First up, function declarations in IpDropDown not meant for public consumption were moved from IpDropDown.h to IpDropDown.cpp.

Full content of IpDropDown.h
Code: [Select]
#pragma once

void InstallIpDropDown();

Ok, now how do classes differ from namespaces?
(A question I didn't think to ask for many years)

Namespaces are a tool for preventing naming collisions and organizing code into logical sections. Classes are for grouping code with a similar responsibility into an object that has a clearly defined public interface and hidden internal workings. Well, that is the answer from my C# hobby perspective anyways... (I didn't look that up, just came out of my brain so it is probably a bit off).

The public interface has been moved from public.h to op2ext.h.

Additionally, I wrote bool GetGameDir_s(char* buffer, unsigned int bufferSize). It returns false if the provided buffer size is too small for the path, but still fills the buffer with as much of the path as possible. Looking for feedback if the bool return is a good addition or not...

op2ext.h's new contents
Code: [Select]
// Outpost 2 Extensions (op2ext) external interface. 
// Exposes functions for use when applying modules to Outpost 2 via the C ABI.
// See ReadMe for specific use instructions. For help, post on the Outpost Universe Forum (

#pragma once

#define EXPORT extern "C" __declspec(dllexport)

// Retrieves the current absolute directory of the Outpost 2 executable with a trailing slash.
// If bufferSize is smaller than required to copy entire path, buffer is provided as much of path as possible and false is returned.
EXPORT bool GetGameDir_s(char* buffer, unsigned int bufferSize);

// DEPRECATED as of version 2.0.0. Use GetGameDir_s instead.
// Retrieves the current absolute directory of the Outpost 2 executable with a trailing slash.
// @buffer Pass a buffer of size MAX_PATH length.
EXPORT||deprecated("GetGameDir was deprecated in op2ext ver2.0.0. Use GetGameDir_s instead.")||
void GetGameDir(char* buffer);

// Returns a pointer to a buffer of [MAX_PATH+1] representing the parameter(s) passed into Outpost 2 after the /loadmod argument.
// The consumer must free the buffer when finished with it.
EXPORT char* GetCurrentModDir();

// Allows loading a vol file into Outpost 2. volFilename must be passed before Outpost 2
// initializes by passing by calling this function from mod_init.
// @param volFilename The vol filename ending in a null terminated string.
//                    Must be a relative path from the directory containing the Outpost 2 executable.
EXPORT void AddVolToList(char* volFilename);

// Overwrites the default Outpost 2 version string.
// Required if the module affects multiplayer to detect incompatibilities between different copies of Outpost 2.
// See the ReadMe for detailed usage. Each variable must be a numeric value between 0-9 and not an ASCII character.
EXPORT void SetSerialNumber(char num1, char num2, char num3);

The one area I'm not sure about here is that I had to include 3 extern calls in op2ext.cpp to bring in the mod loader, and volList, and one bool variable. It doesn't seem too clean, but in order to give EXPORT functions access to the different functions like adding vol files, getting the game directory, and the mod directory, op2ext.cpp will need access to this code.

Also, can anyone shed light on what EXPORT int StubExt = 0 does? It is available externally, but only declared and defined in op2ext.cpp. It should probably be declared in op2ext.h if it is truly meant for consumption outside of the op2ext dll...

Code: [Select]
. . . Includes . . .

extern ConsoleModuleLoader consoleModLoader;
extern VolList volList;
extern bool modStarting;

EXPORT int StubExt = 0;

EXPORT bool GetGameDir_s(char* buffer, unsigned int bufferSize)
    . . .

EXPORT void GetGameDir(char* buffer)
    . . .

EXPORT char* GetCurrentModDir()
    . . .

EXPORT void AddVolToList(char* volFilename)
    . . .

char *verStrAddr = (char*)0x004E973C;
EXPORT void SetSerialNumber(char num1, char num2, char num3)
    . . .

Listing of recent commits. Maybe I need to take what Hooman said to heart and try to reduce the number of commits that I make a little by combining them locally first before pushing to the remote repository...

* Improve encapsulation of IpDropDown

 - Moved function declarations not meant for public consumption to .cpp file.
 - Moved includes to .cpp file since they are no longer required in IpDropDown.h.

* Move all non EXPORT declares from op2ext.h into op2ext.cpp

 - Preparation work for moving all EXPORT function declarations into op2ext.h

* Move non-EXPORT code from op2ext.cpp into DllMain.cpp

In preparation for moving all EXPORT functions into op2ext.h/op2ext.cpp.

* Move public interface for op2ext from public.h to op2ext.h

 - Added EXPORT bool GetGameDir_s(char* buffer, unsigned int bufferSize)
    - Allows for a safer version of GetGameDir that is compatible with the C ABI
 - Moved definitions of all EXPORT functions to op2ext.cpp
 - Improved comments on EXPORT functions

* Rename ModMgr to ConsoleModuleLoader

* Remove dllexport from GetGameDirectory function

It returns a string and is not compatible with the C ABI. See GetGameDir_s for new EXPORT function.

* Remove unnecessary extern call for a modManager in op2ext.cpp

* Rename class CommandLineModuleLoader to ConsoleModuleLoader

Lines up with new filename ConsoleModuleLoader.h/ConsoleModuleLoader.cpp and is a little shorter in length when typing class name.

Game Discussion General / Re: Cataclysm of Chaos V8
« Last post by Hooman on December 06, 2017, 09:56:58 PM »
Agreed on the lore. That is important for an immersive setting.
Computers & Programming General / Re: SVN -> Git Conversions
« Last post by Hooman on December 06, 2017, 09:10:30 PM »
HFL and HFL-IUnit projects have been converted and uploaded to GitHub.

Conversion steps:
Code: [Select]
git svn clone -T LevelsAndMods/trunk/API/HFL/ HFL
git svn clone -T LevelsAndMods/trunk/API/HFL-IUnit/ HFL-IUnit

Both projects had history filtered to remove empty commits, and .lib files.

For HFL:
Code: [Select]
git rebase -i --root
git filter-branch --index-filter 'git rm --cached --ignore-unmatch -r Lib' --prune-empty --tag-name-filter cat -f -- --all

For HFL-IUnit:
Code: [Select]
git rebase -i --root
git filter-branch --index-filter 'git rm --cached --ignore-unmatch -r op2extra.lib' --prune-empty --tag-name-filter cat -f -- --all

After that, projects were uploaded to GitHub.
For HFL:
Code: [Select]
git remote add origin
git push -u origin master

For HFL-IUnit:
Code: [Select]
git remote add origin
git push -u origin master
Outpost 2 Divided Destiny / Re: Outpost 3 Alpha Testing Commencing
« Last post by Zhall on December 06, 2017, 07:51:15 PM »
hehe somewhere along those lines
Game Discussion General / Re: Cataclysm of Chaos V8
« Last post by lordpalandus on December 06, 2017, 12:45:49 AM »
I doubt it would make the game significantly more fun. I do think that something like more lore would make the game much better, as better story, characters and overall lore of the setting really helps with immersion and the desire to replay a game.

So with that, I think I won't bother with Alchemy, and instead focus on more lore and such instead.

Thanks for the input. I appreciate it!

General Interest / Re: Motivational quote ;)
« Last post by lordpalandus on December 06, 2017, 12:19:33 AM »

Consequences, whether good or bad, are strong motivating factors. Incentives and rewards, or simply the absence of pain, are consequences of completing an activity, and thus are motivating factors. However, I will acquiesce and state that my definition of discipline and your definition of discipline may not be the same thing.

Whenever I think of discipline, it is in the form of either military discipline, or a monks pursuit of an ascetic way of living. In the military discipline is there to ensure that soldiers follow orders, lest they suffer consequences and so that when they are under-fire or being shelled, they keep their cool, and remember their training and focus on the task at hand; as if they don't they or the ones around them are going to get hurt or die; thus they use fear as a motivating factor to stay focused... fear of the consequences if they don't. Or with monks, they must live by a strict code of conduct, and will deprieve themselves of things in life, to attain other things, generally spiritual in nature. If they don't deprieve themselves, then they will not get the reward they are seeking, and thus must have discipline to continue to deprieve themselves of things so that they get where they desire to go.

Someone who wants to be someone better than they are currently, has set goals, with incentives to start them and rewards for completing them. Those are motivating factors. I do understand, I think, what you are trying to get at. I am someone who wants to be better than I am, both as a person and as a programmer, and have goals to achieve those things.

Ahh, but that analogy you have there has a hidden negative fear that you failed to mention. Why do you have to go to a gym to stay healthy? Is it fear that compels you to join a gym because you feel that if you don't join a gym, you won't be successful? There are plenty of people who have the ability to keep themselves fit, without ever entering a gym. So I'd still argue that that person is using fear as a motivating factor to visit a gym to stay healthy, rather than one to not join one and remain healthy on their own terms. I bring this up because our society tells us that only those who go to gyms, stay in shape, and thus there is a fear that if we aren't part of a gym, then we cannot meet our health goals.

However as an aside, the desire to be healthy can be the motivating factor and the thing that keeps you remaining at it, to stay on top of ones health.

Also, if you haven't noticed I like to debate and argue a lot. Its one of the ways I find most effective at learning as it allows me to view a problem from multiple angles, by encouraging / inciting responses to make me think differently. ... Even if I don't necessarily want to think differently :P

Truer words have not been spoken. Well said. ("knowing how you function")

Also good point. Not an easy one to stomach mind you, but a good point. I'm working on it.

Heh, concern trolls. I like it. Sounds like an appropriate title.

True, true.

Depends on the dream and depends on the path to the dream. The path to my dream, is likely to long and hard, which is what I'm basing it off of.

Yep. I like to lead, guide, encourage, and empower others, and hate to be around leaders that are terrible at it. I suppose I do have control issues, but I can't see an easy or simple way to solve that. Some people are workers, some people are leaders and some are innovators; what career path works for some, doesn't work for all. Perhaps true my small number of terrible jobs are not indicative of the whole, but, there is no guarantee I'll find a good job, even if I earnestly look for one, whereas there is a higher guarantee that I can make my own ideal job, by making games. Yes it is an assumption, but the way the world is going these days, its more likely I'll have a more ideal working experience, being an entrepreneur than not.

Depression and joblessness may be related, but I do not feel jobless; I may not be making money, but I do feel "employed", doing something worthwhile, and feel like I'm accomplishing things in life. In order to take on a paid job, I'd have to sacrifice my current "jobs" that are currently satisfying me both mentally, emotionally and physically to "potentially" get something better and get paid. Now THAT sounds risky; I have sufficient funds right now to handle my needs, by living frugally, so I don't necessarily NEED a paid job at this time, anyway. So why should I sacrifice what makes me happy, for something that may give the same level of happiness and fulfillment?

If I got paid for a game sold, that would be a good indication that I'm doing the right thing, right? So, perhaps we should shelve the decision to look for paid work, until after we determine if GoG will stock CoC.

Actually, I find the opposite to be true. When I was working a paid job, I felt completely unmotivated to do anything after work. True, I was being harassed in the workplace, and my supervisor has a personal vendetta against me and made my life a living hell, so that might have something to do about it. Actually, most paid jobs I've had, involved workplace harassment, and ruthless supervisors... might be why I don't want to get a paid job... hmmmmmmmm...

I found school to actually be extremely draining, as I'm not a social creature at heart, and being forced in an environment where you are forced into terrible team roles, having pure theory forced down ones throat, and having teachers drone on in a monotone, I actually found school extremely exhausting.

Similarly, social activities with friends are emotionally draining as well; I still do them as they help to retain my sanity levels, but I generally feel about as drained after an hour long conversation, as I do after creatively coding for 4 hours straight.


There is this personality quiz I took =  and it overall gave me the "Logician", although I would sometimes also fit into "Commander" and "Architect", depending on the situation. I bring it up, as the Logician is great with being alone and working on things, but socialization of any kind is extremely grueling and exhausting. Take the quiz for yourself and see what it comes up with; its quite uncanny of determining what ones personality is like.


Excuse yes, but still valid. Fear, and Risk, in taking action, particularly when the current situation is ideal, and the potential of good jobs, outweighs the higher probability that I'll not get a good job and end up miserable. If there was a way to prove that a given job opportunity was better than the current situation, I might very well take it, but you can't guarantee that. I don't like taking gambles on things that affects my emotional wellbeing, unless I'm absolutely forced into the situation. I know that I have various neuroses, that likely wouldn't be desired by employers and there are neuroses with employers that I highly doubt I will be able to cope with... unless I have no other choice in the matter. Currently I do have a choice.

How do I know it to be correct? Observing others, observing my own industry, personal life experiences, personal neuroses/demons, long years of introspection, long years of terrible forced team cooperation with tons of inherent backstabbing, observing politics and trends in human behaviour, the fact that I'm an introvert and not an extrovert, the fact that whenever I was the team leader we succeeded and destroyed all competition, but when I was just part of the team, bickering, infighting, backstabbing, and politics eventually resulted in everyone eating the bullet, and the fact I'm happy and satisfied with my current situation. Yes, my observations do not imply everything will be the same, but generalizations are a very useful tool for risk mitigation and overall fulfillment in life. And yes, I will also agree that my observations may be flawed, and covered in confirmation bias.

Be careful of absolutes yourself. You are assuming that I can only be happy and successful by getting a paid job, and are refusing to consider that I might be able to achieve my goals and career plans without getting a paid job. I have found that over the past 30 years of my life that when I am the leader, things operate smoothly and everyone wins and when I'm not the leader, things crash and burn, and I often get blamed for it, despite pulling my own weight. I don't think I can cope with the stress because I'm tired of being harassed in the workplace and attacked by zealous supervisors with unrealistic expectations. All of my paid jobs, had these issues. I could cope with the stress before, because I didn't have all the much on my plate; I have a lot of things on my mind and a lot of concerns as well. In general, I do not cope with stress too well, and will bottle it up and explode violently later. When I'm under heavy workplace stress, I do not function well and this leads to further attacks and harassment, which further derails me. I have no interest in being part of a workplace where I feel I'm under threat while there and under threat if I leave the place, due to stress related issues. Its a no win situation. Whereas, my current situation, I have enough funds to handle things at the moment, and I feel fulfilled by doing volunteer work and engaged with coding (even if the coding issues are huge and annoying right now) and thus I see no reason to torture myself in going looking for work.

Perhaps, perhaps.

Very true.

What needs to be challenged?
1. People do have limited creative energy. Fact.
2. Jobs demand the best of your best, lest they fire or demote you. Fact.
3. Game developers that take on full-time jobs, while still trying to develop, always slow development down to a crawl. Fact.
4. Menial labor jobs are tasks the lizard brain (medulla oblongata / brain stem) loves as they are repetition based and requires no creative energy. Fact.
5. Creating video games take an enormous amount of creativity to do, and creativity comes most naturally when you are not stressed and feel emotionally stable. Fact.

What have I missed, in my assumptions or fact-checking?

I'd reply to leeor, but this post already has taken about an hour and a half to write and I need a break.

Outpost 2 Update / Re: Allowing Outpost2 to load any vol file (*.vol)
« Last post by Hooman on December 05, 2017, 10:21:06 PM »
It has several functions that should not be called by code external to ipDropDown.cpp

Ok, now how do classes differ from namespaces? ;)
(A question I didn't think to ask for many years)

Also, it has member variables that should only be updated by ipDropDown.cpp. In particular:

char ipStrings[10][47];
int numIpStrings = 0;

That's perhaps closer to the reason. A class ties functions together with instance data.

Now, how many instances will there be of this class? I'd say this sounds like a singleton class. Which might be implemented as a class with static methods and variables. Which is much like a namespace with private global variables (excuse the contradictory sounding terminology).

Actually, if those methods are used to hook internal Outpost2.exe code, you can't move them into a class without also declaring them static, since otherwise you'd be changing the function signature to use an incompatible binary interface.

If we move the declaration of a function or a variable to the .cpp file, is this considered encapsulated? It might be a nice alternative. Since the rest of op2ext doesn't need to call WriteAddressesToIniFile, we could move its declaration to the .cpp file. Would this be a positive move?

That would be a good idea. Whenever possible, I like to keep things only in the .cpp file rather than the .h file. It reduces namespace pollution, and can improve compile times. Moving a function from a .h to a .cpp doesn't exactly make it private, but it does make it less visible. Another file could still access the function by explicitly declaring its signature.
Outpost 2 Divided Destiny / Re: Outpost 3 Alpha Testing Commencing
« Last post by Hooman on December 05, 2017, 09:59:20 PM »
Cards Against Humanity? ;)

Win Bigly?
Outpost 2 Update / Re: Allowing Outpost2 to load any vol file (*.vol)
« Last post by leeor_net on December 05, 2017, 09:26:43 PM »
Want to suggest (again I think?) that markdown is probably a better format to use for readme's.

Also minor edit to your post, I put the readme file into a code tag for the sake of readability.
Pages: 1 [2] 3 4 ... 10