The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
October 01, 2022, 04:05:33 am
Home Help Search Login Register
News: Paul & Fred have reached a settlement with Stardock!

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  General UQM Discussion (Moderator: Death 999)
| | |-+  New Mod: Mega Mod for 0.7.0 and UQM-HD
« previous next »
Pages: 1 2 [3] 4 5 6 Print
Author Topic: New Mod: Mega Mod for 0.7.0 and UQM-HD  (Read 12981 times)
Jugger
Frungy champion
**
Offline Offline

Gender: Male
Posts: 64



View Profile WWW
Re: New Mod: Mega Mod for 0.7.0 and UQM-HD
« Reply #30 on: June 27, 2016, 03:18:53 am »

I'm curious about it. Good luck! Smiley

By the way, an info and a hint about the new heap size:

At the moment I collected almost all valuable minerals of the galaxy from rare earth (green) on upwards plus some noble gas (blue), the size of the save game is now at about 25 KB. Insofar it's okay for me, but if someone grabs a lot of less valuable minerals too, then I'm afraid that the heap could run short. You must bear in mind that there're still large amounts of base metals and corrosives left, which might increase the heap usage to more than 30 KB, when collected. Thus I'd recommend to increase the heap size a little bit more to about 40 or 50 KB, just as a precaution.
Logged

- Norbert
My Darkstar One mod project Versteckte Cluster (German).
Krulle
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1111


*Hurghi*! Krulle is *spitting* again!


View Profile
Re: New Mod: Mega Mod for 0.7.0 and UQM-HD
« Reply #31 on: June 27, 2016, 04:55:45 pm »

Now how to make it so they don't turn on you when you get the helix, maybe they give it to you?

I think, that would be a good idea.

Correction:
It might be easier to let the player get the helix by himself from the planet as normal, and then add one more conditional expression in the part of the code, where the Thraddash turn against you, so they won't become hostile.

Something like this pseudocode:
Code:
if (helix_retrieved and not allied) then
turn_hostile
end
...where the "and not allied" is the additional condition.

Otherwise, when you want the Thraddash to give away the helix, you must also modify the database by adding new text and speech ("fiddling with addon content"), the last might be beyond your means or too extensive.
I thought the Thraddash guard the planet until you're allied or sent them off to fight the enemy of their masters.
Having an ally steal something that valuable is soemthing I definitely see as a reason to become hostile.
Having a non-allied power steal an important artifact is also something I consider sufficient reason to become hostile.

Logically, I would prefer an "ask for the Helix as a gift" if you have bought the information from the Melnorme that you'll need the Helix to repair the Ultron. And if you're allied, that will work without the Thraddash becoming hostile.
If adding further conversation-tree elements is out of the question, simplify to stealing then not being problematic.
So, I would amend the "code" to:
Code:
FUNCTION hostile:BOOLEAN:  //Thraddash hostile or not
  IF (helix_retrieved AND (NOT Helix-Infor_Melnorme)
    THEN hostile=TRUE;  //whether allied or not: there was no reason for you to steal that thing.
  ELSE hostile=FALSE   //not retrieved: no reason for hostilities; helix_retrieved AND Helix-Infor_Melnorme = you were able to explain it away, even if there is no conversation tree for that available.
end;

This way, to get the advantage of further being allied you'll need to spend resources with the Melnorme. An acceptable trade-off IMHO.  (Back then I actually tried if I could make this happen.) The continued alliance is then not a free gift.
Logged
Kohr-Ah Death
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1366



View Profile WWW
Re: New Mod: Mega Mod for 0.7.0 and UQM-HD
« Reply #32 on: June 27, 2016, 05:22:44 pm »

Well there is a scenario where the Thraddash let you down onto the planet willingly, if you are allied of course.
Normally they become hostile once you come back up.

I'm fiddling with the code to make sure that the only time you can ever grab the Helix and not piss them off is if they are not fighting the Kohr-Ah, not fighting the Ilwrath, you are allied, and they let you on the planet willingly.
With the caveat that if the Kohr-Ah wipe the Thraddash out then none of this matters.
So basically, don't try to steal it when the Thraddash are on mission and everything will be fine.

EDIT:

Fiddling is almost done, looks like everything works out perfectly so far
If the Thraddash are fighting the Ilwrath and you take the Helix, they stop being allies.
Before or after you can talk your way down to the planet and they will still be allies if you take the Helix.

EDIT: An addendum to the Thraddash thing: The Thraddash now die out if you decide to take the Helix from them during their battle with the Ilwrath

I'm curious about it. Good luck! Smiley

By the way, an info and a hint about the new heap size:

At the moment I collected almost all valuable minerals of the galaxy from rare earth (green) on upwards plus some noble gas (blue), the size of the save game is now at about 25 KB. Insofar it's okay for me, but if someone grabs a lot of less valuable minerals too, then I'm afraid that the heap could run short. You must bear in mind that there're still large amounts of base metals and corrosives left, which might increase the heap usage to more than 30 KB, when collected. Thus I'd recommend to increase the heap size a little bit more to about 40 or 50 KB, just as a precaution.

We'll see. I'll up to 32 in the mean time.

You can test this out in the new build coming up where I made a few lander modifications. Storage is doubled in all areas and the lander lands on spot.
The only graphical glitch is the lander cargo, you can keep pickup up materials and life forms after the gauge reaches the top.
Though the little grey storage tanks underneath your ship compensate for the extra space. I'll figure it out sooner or later.
« Last Edit: June 27, 2016, 11:52:21 pm by Kohr-Ah Death » Logged

The artist once again known as Kohr-Ah Death.

Get your MegaMod HERE
Jugger
Frungy champion
**
Offline Offline

Gender: Male
Posts: 64



View Profile WWW
Re: New Mod: Mega Mod for 0.7.0 and UQM-HD
« Reply #33 on: June 27, 2016, 11:32:32 pm »

... and the lander lands on spot.

That's good, but a small deviation would have been okay, especially in heavy weather conditions (e.g. in excess of class 4). Wink

The only graphical glitch is the lander cargo, you can keep pickup up materials and life forms after the gauge reaches the top.

Just for my understanding:
Does it mean, that only the gauge has to be adapted yet? What's about the cargo full sound, does it ring out when the cargo space is really filled up completely?
Logged

- Norbert
My Darkstar One mod project Versteckte Cluster (German).
Kohr-Ah Death
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1366



View Profile WWW
Re: New Mod: Mega Mod for 0.7.0 and UQM-HD
« Reply #34 on: June 27, 2016, 11:54:51 pm »

You can continue picking up minerals and life forms until you hit the real limit.
For some reason the lander gauge is not compensating for the new limit like the Storage Bays do.
It will look full, but you can pick up twice more than the bar indicates. Once I find out where the bar is drawn in the code I will compensate it myself.

EDIT:

Another new development on the Thraddash front; If you decide to steal the Helix during the Ilwrath war, all Thraddash ships leave your fleet.
Considering how loyalist these guys are when it comes to their Helix and Clans this made perfect sense to me.

UPDATE:

Here is a Beta for you to test out. I have to go AFK for awhile.

DOWNLOAD

The new commands are:

--unlockupgrades : Unlocks all the Melnorme tech upgrades
--fastforward : Divides time by a factor of 5. 1 second day in HS / 5 second day in IP
--landermods : Land on spot and double storage capacity all around

EDIT:

I just noticed a bunch of animations in UQM HD are simply horrible. Just a comment really.
Like the ship in Hyper Space when pointed bottom right is offset differently than the rest.
And the ship during interplanetary is just horrid, let it sit still and spin around, you'll see what I mean.
« Last Edit: June 28, 2016, 02:41:39 am by Kohr-Ah Death » Logged

The artist once again known as Kohr-Ah Death.

Get your MegaMod HERE
Jugger
Frungy champion
**
Offline Offline

Gender: Male
Posts: 64



View Profile WWW
Re: New Mod: Mega Mod for 0.7.0 and UQM-HD
« Reply #35 on: June 28, 2016, 03:46:52 am »

Thank you! I will start the test of the Beta very soon.

I just noticed a bunch of animations in UQM HD are simply horrible.

Which resolution? In UQM HD hires4x I cannot see any glitches in the anims.
But I don't play in the other "micro"-resolutions, maybe only there?
Do you use them, and did you stretch the GFX in the options perhaps?

That brings me to another point; the options in the file uqm.cfg should be sorted alphabetically.
It's not important, but you can find desired entries faster then, when edited manually.


EDIT:
landermods and unlockupgrades tested, they work very well. Can be activated even on existing save games.
« Last Edit: June 28, 2016, 04:48:23 am by Jugger » Logged

- Norbert
My Darkstar One mod project Versteckte Cluster (German).
Kohr-Ah Death
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1366



View Profile WWW
Re: New Mod: Mega Mod for 0.7.0 and UQM-HD
« Reply #36 on: June 28, 2016, 05:56:16 pm »

The animations are messed up on 2x.

They're perfect in classic mode. I honestly don't like the HD resolutions but I love the addition of textured and rotating planets.

I've looked into alphabetizing the cfg files, but I couldn't figure it out. Kind of difficult the way the files are handled. I'll keep looking but I can't promise anything.
Logged

The artist once again known as Kohr-Ah Death.

Get your MegaMod HERE
Jugger
Frungy champion
**
Offline Offline

Gender: Male
Posts: 64



View Profile WWW
Re: New Mod: Mega Mod for 0.7.0 and UQM-HD
« Reply #37 on: June 28, 2016, 08:20:33 pm »

I've looked into alphabetizing the cfg files, but I couldn't figure it out.

I've looked around in the files too now and will try to help you a little:

In the sources of UQM 0.7.0 ("uqm-0.7.0\src\") and UQM HD Beta ("uqm-hd-0.2"\src\") I found the files setupmenu.c and uqm\uqm.c with the corresponding entries. I guess, that setupmenu.c with the function SetGlobalOptions could be the right one.

In there the next-to-last command is:
Code:
SaveResourceIndex (configDir, "uqm.cfg", "config.", TRUE);
This function can be found in the file "libs\resource\resinit.c".

The problem: "config." is a hash table. The sort sequences of the entries in those tables are always undefined, they are ordered randomly. You'd have to put the names and values into a temporary table which must be indexed numerically, then sort it alphabetically by the name-strings, e.g. with the quicksort algorithm, and not till then (after the loop in SaveResourceIndex is finished) you can write the entries one by one into the uqm.cfg.

PHEW! That's too complex and far to much work for such a at the first sight seemingly simple task.
So forget it, I didn't request anything in my post #35. Lips Sealed And I'm afraid my attempt to help failed. Sad
Logged

- Norbert
My Darkstar One mod project Versteckte Cluster (German).
Kohr-Ah Death
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1366



View Profile WWW
Re: New Mod: Mega Mod for 0.7.0 and UQM-HD
« Reply #38 on: June 28, 2016, 09:40:13 pm »

I came to sort of the same conclusion. I saw the SaveResourceIndex and looked up how to sort arrays to see if there were any function that can be accessed readily like PHP or C# does
Quicksort was the only thing that came up.

Of course I can't figure out an implementation that would actually work.
What I would prefer it be like any other game's cfg or ini file, for the options to be separated into categories.

But I use the shortcut for options not the cfg file.

If you would like I could set up a git so you could make contributions as well. Seems like the only logical step is to fork HD into our own thing.
Logged

The artist once again known as Kohr-Ah Death.

Get your MegaMod HERE
Jugger
Frungy champion
**
Offline Offline

Gender: Male
Posts: 64



View Profile WWW
Re: New Mod: Mega Mod for 0.7.0 and UQM-HD
« Reply #39 on: June 28, 2016, 10:48:37 pm »

Quicksort was the only thing that came up.

Quicksort is the fastest algorithm for sorting tables I know of. Also its code is short and reliable. I believe, none of the others (like Bubblesort etc.) are used anymore these days. But as I said before, hash tables cannot be sorted, I've already tried this once with a quicksort function I wrote in Lua. Without success, they must be converted to numerically indexed tables first.

If you would like I could set up a git so you could make contributions as well.

Thanks, I will consider that and tell you then.

But my problem is, I'm not very familiar with C. Though the code of this project is stunningly clear and clean compared to many other sources with horrendous cryptic syntax. So reading and understanding it, making some minor modifications, and giving a few suggestions could be within my skill. But there's more. Somewhere here in the forum I've read, that it shall be rather tricky to set up the C environment until it works properly. So I'm not shure, if I can exercise enough patience to learn all this stuff. Good manuals, which I surely will find in the web, are therefore essential.

EDIT, sorry, I missed this:
Quote
Of course I can't figure out an implementation that would actually work.

I couldn't find anything in the English-speaking WWW either.
But in the German part there are a couple of useful sites. You don't have to understand the text, the shown functions are self-explanatory.

http://www.linux-related.de/index.html?/coding/sort/sort_quick.htm - here you can use right the first one
http://www.bluffton.edu/homepages/facstaff/nesterd/java/SortingDemo.html - only one function, written in Java
« Last Edit: June 29, 2016, 12:44:35 am by Jugger » Logged

- Norbert
My Darkstar One mod project Versteckte Cluster (German).
Kohr-Ah Death
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1366



View Profile WWW
Re: New Mod: Mega Mod for 0.7.0 and UQM-HD
« Reply #40 on: June 29, 2016, 12:42:55 am »

If you would like I could set up a git so you could make contributions as well.

Thanks, I will consider that and tell you then.

But my problem is, I'm not very familiar with C. Though the code of this project is stunningly clear and clean compared to many other sources with horrendous cryptic syntax. So reading and understanding it, making some minor modifications, and giving a few suggestions could be within my skill. But there's more. Somewhere here in the forum I've read, that it shall be rather tricky to set up the C environment until it works properly. So I'm not shure, if I can exercise enough patience to learn all this stuff. Good manuals, which I surely will find in the web, are therefore essential.

EDIT, sorry, I missed this:
Quote
Of course I can't figure out an implementation that would actually work.

I couldn't find anything in the English-speaking WWW either.

http://www.linux-related.de/index.html?/coding/sort/sort_quick.htm
http://www.bluffton.edu/homepages/facstaff/nesterd/java/SortingDemo.html


Setting up an environment is easy enough. I've got it down to a replicable science.
Visual Studio 2010, either express or enterprise. I have the VS10 libraries needed on Google Drive so I can download them whenever I need them.
Actually, any Visual Studio from 6 - 10 works but anything newer than that requires a bit of jiggery pokery I am not skillful enough to deal with.

The devs for HD started working on adjusting the code to work with 12 but I don't think they fully succeeded. They have a binary in their trunk on sourceforge but it is wrought with graphical glitches.

Right now I am working on cleaning up the linker and output when building. Basically making all the compiled code go into a "bin" folder. So far it is being a bit troublesome.

EDIT:

Figured out my linker issue, postprocess command was pointing in the wrong direction and I fixed it.

Now the output goes into the bin folder instead of the root folder. Just seemed too cluttered for my taste.

UPDATE:

Interesting problem, not too severe. UQM-HD can't read the base content from a zip like Classic can, it can read addons just fine when zipped but it kicks back that it can't find the base content when it is zipped and placed appropriately.
« Last Edit: June 29, 2016, 03:06:17 am by Kohr-Ah Death » Logged

The artist once again known as Kohr-Ah Death.

Get your MegaMod HERE
Jugger
Frungy champion
**
Offline Offline

Gender: Male
Posts: 64



View Profile WWW
Re: New Mod: Mega Mod for 0.7.0 and UQM-HD
« Reply #41 on: June 29, 2016, 04:00:08 am »

Interesting problem, not too severe. UQM-HD can't read the base content from a zip like Classic can, ...

Good to know!

All along I wondered at the fact, that there exist the packed file base.uqm AND a folder with the unpacked base.
I've already made two small modifications (gamestrings.txt and comm\pkunk\pkunk.txt) directly in the unzipped base, but not the .uqm.
So I didn't realize this issue so far. Obviously I've been lucky with that.  Problem solved, see next passage.

EDIT:
I've got it! Under the folder "content" you must create a new sub-folder "packages" and move the zipped base.uqm over there.
The configuration files remain at their place. Then everything works fine again. If desired, you may delete the base directory afterwards.


EDIT 2:
Hopefully I won't get beaten now...
but could you increase the constant MAX_SAVED_GAMES in "src\uqm\gameopt.c" to 100 please?
I'm always running short of this.
« Last Edit: June 29, 2016, 02:08:46 pm by Jugger » Logged

- Norbert
My Darkstar One mod project Versteckte Cluster (German).
Kohr-Ah Death
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1366



View Profile WWW
Re: New Mod: Mega Mod for 0.7.0 and UQM-HD
« Reply #42 on: June 29, 2016, 10:58:57 pm »

Sweet. Good to know, I was just zipping it all up in one big package.

I just wanted to be able to commit it to github in one shot.

Hopefully I won't get beaten now...
but could you increase the constant MAX_SAVED_GAMES in "src\uqm\gameopt.c" to 100 please?
I'm always running short of this.

I'll squeeze out a binary on this laptop, then you can tell me if it works.

UPDATE: Link is same as the last one.
« Last Edit: June 29, 2016, 11:11:12 pm by Kohr-Ah Death » Logged

The artist once again known as Kohr-Ah Death.

Get your MegaMod HERE
Jugger
Frungy champion
**
Offline Offline

Gender: Male
Posts: 64



View Profile WWW
Re: New Mod: Mega Mod for 0.7.0 and UQM-HD
« Reply #43 on: June 29, 2016, 11:39:11 pm »

Just went through, save... save... save... until the keys were blazing... it works without any problems. Thanks!
Logged

- Norbert
My Darkstar One mod project Versteckte Cluster (German).
Kohr-Ah Death
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1366



View Profile WWW
Re: New Mod: Mega Mod for 0.7.0 and UQM-HD
« Reply #44 on: June 30, 2016, 12:07:16 am »

Awesome! Was worried about the graphics not compensating like so many other things.
Logged

The artist once again known as Kohr-Ah Death.

Get your MegaMod HERE
Pages: 1 2 [3] 4 5 6 Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!