aliens

Author Topic: [Piratez] Alt-Corpse Mod 0.2.99.c.1.a (Patch)  (Read 51025 times)

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: [Piratez] Alt-Corpse Mod 0.2.99.A.1.b - Early Update
« Reply #75 on: September 20, 2016, 06:06:27 pm »
Just sad that you already went the 100k+ way... it has very bad impact on memory requirements  :'(

Yup, Piratez is unplayable on one of my laptop since the addition of the new music. I have 1Gb ram, which is admittedly tiny by today's standards, but is humongous by XCom standards. Something is quite wrong with the memory use of OpenXCom and Piratez makes it quite apparent.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8597
    • View Profile
Re: [Piratez] Alt-Corpse Mod 0.2.99.A.1.b - Early Update
« Reply #76 on: September 20, 2016, 07:05:19 pm »
Try and cram 800 objects (actually, almost 900, since most vanilla bigobs are in use as well) in 999 slots while retaining any space whatsoever for doing it orderly.

Why orderly? Just take next free number, ordering is done via listOrder (where applicable), not via IDs.

Probably already broken by the extra 150 corpse items added by Ivan's mod;

Ivan's mod will not interfere with your numbering in any way (unless he uses negative numbers, which is probably not even possible). It's actually you, who can interfere with Ivan's numbering. Always the mod with lower index can interfere with mod with higher index (if 0..999 rule is broken).

As for the handobs, the limit is actually 125, (since each is occupying 8 spaces), so my 200 already is well over that.

Yes, you're right. I missed that.

Having said that, I'm interested in your explanations.

Yeah, it will take a while. I need to double check everything, so that I don't say something which is not 100% true.

But in general, ideas are:
1. use all numbers, don't skip numbers just for convenience.
2. split your mod into more parts (master + 1-2 small additions; ideally master being the "real master", not "fake master")
3. I can increase the 1000 offset to something slightly bigger (e.g. 2000)...
4. ...or maybe, I can increase the 1000 offset for real master game only (to 10'000 for example) and keep 1'000 for mods -- would have some limitations, but who would make a total conversion for a total conversion? :) -- that would require that you make your mod a real master, not a fake master
5. a combination of any or all of above

More details later.

PS. Also while your solution is true for normal mods, "master mods" are more severely constrained. Several solutions were proposed when the system was being implemented, but Warboy's defence of 'one 1000-size fits all' was absolute.

I don't see a difference in code between the "fake master mods" (e.g. PirateZ) and normal mods (e.g. Ivan's mod). Both use the 1'000 offset.

As written above, I could increase the range for "real master game", but you would have to stop referencing xcom1 and take it into your game directly.
Frankly, I don't know who even came up with the "fake master mods" idea, that makes no sense to me. It combines just the disadvantages of real masters and real mods, there's no advantage to it really.
« Last Edit: September 20, 2016, 07:17:40 pm by Meridian »

Offline Yankes

  • Commander
  • *****
  • Posts: 3194
    • View Profile
Re: [Piratez] Alt-Corpse Mod 0.2.99.A.1.b - Early Update
« Reply #77 on: September 20, 2016, 07:13:37 pm »
But in general, ideas are:
1. use all numbers, don't skip numbers just for convenience.
2. split your mod into more parts (master + 1-2 small additions; ideally master being the "real master", not "fake master")
3. I can increase the 1000 offset to something slightly bigger (e.g. 2000)...
4. ...or better, I can increase the 1000 offset for real master game only (to 10'000 for example) and keep 1'000 for mods -- that would require that you make your mod a real master, not a fake master
5. a combination of any or all of above

6. Define "size" of mod. One mod can eat up next mods "ids", e.g.
if master define size = 10 then first mod will have ID = 11, second will have ID = 12 etc.
Each mod can define it too, this will push next one ID further.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8597
    • View Profile
Re: [Piratez] Alt-Corpse Mod 0.2.99.A.1.b - Early Update
« Reply #78 on: September 20, 2016, 07:19:14 pm »
6. Define "size" of mod. One mod can eat up next mods "ids", e.g.
if master define size = 10 then first mod will have ID = 11, second will have ID = 12 etc.
Each mod can define it too, this will push next one ID further.

Yeah, that's a generalization of 4... I'd probably come to the same conclusion after some thinking  ::)

Btw. Yankes, this change would be better suited for OXCE (or OXC of course) than OXCE+... wouldn't you be interested in implementing it?
« Last Edit: September 20, 2016, 07:25:06 pm by Meridian »

Offline Yankes

  • Commander
  • *****
  • Posts: 3194
    • View Profile
Re: [Piratez] Alt-Corpse Mod 0.2.99.A.1.b - Early Update
« Reply #79 on: September 20, 2016, 08:06:27 pm »
Yes, even if you did it I would grab it to my branch.

Offline Dioxine

  • Commander
  • *****
  • Posts: 5412
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: [Piratez] Alt-Corpse Mod 0.2.99.A.1.b - Early Update
« Reply #80 on: September 20, 2016, 08:16:16 pm »
1. use all numbers, don't skip numbers just for convenience.
2. split your mod into more parts (master + 1-2 small additions; ideally master being the "real master", not "fake master")

Sir I like 1990's, but must we return to the Middle Ages? :)
Maybe the code could check the max sprite number used in the mod and offset according to that number, by a proper number of 1000's? Or allow the ruleset to define the offset the mod needs (in 1000's) manually, by the modder? IMO clean, simple, maximum memory save.

Frankly, I don't know who even came up with the "fake master mods" idea, that makes no sense to me. It combines just the disadvantages of real masters and real mods, there's no advantage to it really.

I think it has to do with the dependency on OG's resources.

Why orderly? Just take next free number, ordering is done via listOrder (where applicable), not via IDs.

Listorders are more PITA than they're of any real use (in a total conversion, at least). You could simply pile-up stuff one above other for about the same utility. I was more about things, like corpse having the same floorob and bigob number, so you can't make a mistake when referencing sprites.
« Last Edit: September 20, 2016, 08:20:30 pm by Dioxine »

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8597
    • View Profile
Re: [Piratez] Alt-Corpse Mod 0.2.99.A.1.b - Early Update
« Reply #81 on: September 20, 2016, 08:33:33 pm »
Sir I like 1990's, but must we return to the Middle Ages? :)

I get the message... one part of me even agrees with you, the other is confused.

Yes, even if you did it I would grab it to my branch.

Not sure if that means "yes" or "maybe", but I will not be working on this change anytime soon (at least 2 months), so feel free to do it.
If not done in 2 months, we can talk about it again.

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: [Piratez] Alt-Corpse Mod 0.2.99.A.1.b - Early Update
« Reply #82 on: September 20, 2016, 09:41:32 pm »
How about before defining sprites, a mod defines how many it has? So each mod would define its own length and the next mod is offset by that. It's easier than the game having to count the resources, and more efficient than predefining offsets.

Offline Yankes

  • Commander
  • *****
  • Posts: 3194
    • View Profile
Re: [Piratez] Alt-Corpse Mod 0.2.99.A.1.b - Early Update
« Reply #83 on: September 21, 2016, 01:17:57 am »
I get the message... one part of me even agrees with you, the other is confused.

Not sure if that means "yes" or "maybe", but I will not be working on this change anytime soon (at least 2 months), so feel free to do it.
If not done in 2 months, we can talk about it again.
This probably will be simply and I will try do it in this week.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8597
    • View Profile
Re: [Piratez] Alt-Corpse Mod 0.2.99.A.1.b - Early Update
« Reply #84 on: September 21, 2016, 10:20:06 am »
This probably will be simply and I will try do it in this week.

Thanks, yeah I also think it should not be very complicated.

The reason I can't do it now, is because most of the functions used are optimized by the compiler (thus not available in Release mode) and I am able to run/develop OXC only in Release mode (since I couldn't bring yaml-cpp to work on VS2015 in debug mode). Ashamed to admit that, but I will try to fix/workaround this somehow or switch to a completely different development environment in November/December.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8597
    • View Profile
Re: [Piratez] Alt-Corpse Mod 0.2.99.A.1.b - Early Update
« Reply #85 on: September 21, 2016, 02:25:17 pm »
Also. New code. 2 images. 8 lines. *dies*

OK, 3 images and 13 lines  :P

Code: [Select]
extraSprites:
  - type: BigStunIndicator
    singleImage: true
    files:
      0: Resources/UI/bigob-zzz.png
  - type: FloorStunIndicator
    singleImage: true
    files:
      0: Resources/UI/floorob-zzz.png
  - type: FloorWoundIndicator
    singleImage: true
    files:
      0: Resources/UI/floorob-wound.png

Some examples attached.
I'm no pixel artist, so they look ugly.
The inventory overlay is actually animated (similar to primed grenade indicator), although you can't see it on the picture obviously.
« Last Edit: September 21, 2016, 02:27:05 pm by Meridian »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [Piratez] Alt-Corpse Mod 0.2.99.A.1.b - Early Update
« Reply #86 on: September 21, 2016, 03:19:37 pm »
I'm no pixel artist, so they look ugly.

Hey, I like those zzz's of yours :)

Offline Dioxine

  • Commander
  • *****
  • Posts: 5412
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: [Piratez] Alt-Corpse Mod 0.2.99.A.1.b - Early Update
« Reply #87 on: September 21, 2016, 04:45:44 pm »
Maybe bad pixel artist, but a very good thief - these look expertly stolen and of quality good enough to use them straight away! However I think I prefer Ivan's floating crosses for the floorob indicator :)

Speaking of which, Ivan, since it's that easy now, I'll add these 3 indicators to my mod. But we still want to have your alternate bigobs, so please remove the indicators once this is in, but keep turned corpses - they're a great feature!

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8597
    • View Profile
Re: [Piratez] Alt-Corpse Mod 0.2.99.A.1.b - Early Update
« Reply #88 on: September 21, 2016, 04:57:49 pm »
Maybe bad pixel artist, but a very good thief - these look expertly stolen and of quality good enough to use them straight away! However I think I prefer Ivan's floating crosses for the floorob indicator :)

ZZZ is public domain: https://commons.wikimedia.org/wiki/File:Zzz_sleep.svg
Red cross flag is free to use (even for commercial use): https://www.softicons.com/web-icons/vista-flags-icons-by-icons-land/international-red-cross-flag-3-icon

Speaking of which, Ivan, since it's that easy now, I'll add these 3 indicators to my mod. But we still want to have your alternate bigobs, so please remove the indicators once this is in, but keep turned corpses - they're a great feature!

If you add all 3, why do you still need the original files?
The bigobs (in the inventory) already show both stun and wound indicators... is there some other feature I've missed?

Also, maybe add as optional mod?
I'm not sure if I want these shown by default.
« Last Edit: September 21, 2016, 05:02:53 pm by Meridian »

Offline Dioxine

  • Commander
  • *****
  • Posts: 5412
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: [Piratez] Alt-Corpse Mod 0.2.99.A.1.b - Early Update
« Reply #89 on: September 21, 2016, 05:05:29 pm »
In Ivan's mod, each corpse has 2 bigob versions: stunned and killed, the latter bloodied and mirrored as compared to the first.