Jump to content


Photo

Apoc'd


  • Please log in to reply
333 replies to this topic

#251 RagnarokX

RagnarokX

    Squaddie

  • Forum Members
  • PipPip
  • 2 posts

Posted 08 February 2010 - 02:47 PM

Weird, that didnt help.

Can you confirm the blank screen w/ mouse after difficulty is actually hinting at messed up edit ?


Basicly i installed roadwar mod and then made the tank edit.
My save from before the tank edit (after roadwar install) does load properly.


Edit: Figured it out. Apparently, i cant start a new game on "easy" settings. Choosing medium will work just fine.
How could that be ?

Edited by RagnarokX, 08 February 2010 - 02:52 PM.


#252 RagnarokX

RagnarokX

    Squaddie

  • Forum Members
  • PipPip
  • 2 posts

Posted 08 February 2010 - 02:55 PM

By the way, the roadwar mod alters a couple of vehicle designs. Will apoc'd recognize the altered settings or must i choose between either roadwar OR apoc'd ?

#253 j'ordos

j'ordos

    Alien Concept Task Force

  • Xenocide Artwork Department
  • 5,059 posts

Posted 08 February 2010 - 03:11 PM

Ah you're using the steam version so you don't have all the required files present. Look in the ufodata folder and look for files that have a size of 0 bytes. (Citymap.dat, citymap1-5.bld and albuild mostly) Deleting those should fix the problem, though every time you start apoc'd the problem will reappear. To fix this permanently and allow editing of buildings you should

find ...\steamapps\common\xcom apocalypse\cd.iso
Mount cd.iso using Daemon Tools, or open it using a high-quality archiver like WinRAR.

Copy the following folders to ...\steamapps\common\xcom apocalypse\XCOMA
MAPS
RAWSOUND
smk
TACDATA
TACEXE
TACINI
UFODATA
UFOEXE
UFOPAEDI
To repair damage by attempting to install this fix, have steam "verify integrity" on Apocalypse.

(for apoc'd and roadwar the ufodata folder will be enough though)

edit: apoc'd works just fine with roadwar.

Edited by j'ordos, 08 February 2010 - 03:12 PM.

"You can't trust your eyes if your imagination's out of focus" - Mark Twain
"The mind is like an umbrella, it functions best when open" - Walter Gropius
Posted Image
SNEKK BLOG U-LAR MEKHH! GAHGHH! RK!
GRRGH RGGHH SNORRTT GHACKHGG

Now presented in DoubleVision™ (where drunk)

#254 RagnarokX

RagnarokX

    Squaddie

  • Forum Members
  • PipPip
  • 2 posts

Posted 09 February 2010 - 12:10 PM

Okay, i just did overwrite all those files with the one from the game cd. I will let you know how it turned out.

By the way, is it possibly to enter NEW weapons into the datafiles or can you just edit existing ones ? So so say, is the # of entries hardcoded, or are there actually "empty" lines which could be filled enabling new content ?

#255 j'ordos

j'ordos

    Alien Concept Task Force

  • Xenocide Artwork Department
  • 5,059 posts

Posted 09 February 2010 - 12:43 PM

Nope, no new content can be added to the game, though there are a bunch of unused items left over which could be salvaged into 'new' weapons.
edit: released a new version adding and fixing some stuff. Get it at the usual address. I finally gave in and added some checks which should prevent the creation of those 0 byte files. But I'll try and hold this against Steam for the rest of my life if I can! Wasn't it enough to pull out some random exe with completely different offsets??

Edited by j'ordos, 09 February 2010 - 01:48 PM.

"You can't trust your eyes if your imagination's out of focus" - Mark Twain
"The mind is like an umbrella, it functions best when open" - Walter Gropius
Posted Image
SNEKK BLOG U-LAR MEKHH! GAHGHH! RK!
GRRGH RGGHH SNORRTT GHACKHGG

Now presented in DoubleVision™ (where drunk)

#256 RagnarokX

RagnarokX

    Squaddie

  • Forum Members
  • PipPip
  • 2 posts

Posted 09 February 2010 - 02:32 PM

Okay, so it worked. I can play easy and medium and my altered griffon now has 2 gun slots 1x4 size, and i made the laser 7000 available to ground units as well.
This is pretty decent, cool tool.

#257 j'ordos

j'ordos

    Alien Concept Task Force

  • Xenocide Artwork Department
  • 5,059 posts

Posted 09 February 2010 - 02:58 PM

Nice, good to know. :)


Guess what everybody
XCOM4.png

It's multiplayer Xcom apocalypse and it's only for me!! :banana:
Also it looks like crap. So, um, hurray.. or something..

edit: reuploaded v3.03a as it didn't save signed vars

Edited by j'ordos, 10 February 2010 - 02:42 PM.

"You can't trust your eyes if your imagination's out of focus" - Mark Twain
"The mind is like an umbrella, it functions best when open" - Walter Gropius
Posted Image
SNEKK BLOG U-LAR MEKHH! GAHGHH! RK!
GRRGH RGGHH SNORRTT GHACKHGG

Now presented in DoubleVision™ (where drunk)

#258 RagnarokX

RagnarokX

    Squaddie

  • Forum Members
  • PipPip
  • 2 posts

Posted 12 February 2010 - 12:10 PM

Could you, in theory, enter (or edit one of the useless stock vehicles) a vehicle that can be produced after tech X is researched, where the actual voxel (?) used is an alien vessel ?
simplified, research alien class x, be able to manufacture it.

#259 Hobbes

Hobbes

    UFO2000 Staff

  • Moderators
  • PipPipPipPip
  • 719 posts

Posted 12 February 2010 - 02:17 PM

Nice, good to know. :)


Guess what everybody
XCOM4.png

It's multiplayer Xcom apocalypse and it's only for me!! :banana:
Also it looks like crap. So, um, hurray.. or something..

edit: reuploaded v3.03a as it didn't save signed vars


Soon you will meet j'obbes in combat ;)

#260 MiniMacker

MiniMacker

    Sergeant

  • Forum Members
  • PipPipPip
  • 30 posts

Posted 12 February 2010 - 02:45 PM

*gargle grgl mrggbl*

Multiplayer, gief nao.
NAO!!1

#261 j'ordos

j'ordos

    Alien Concept Task Force

  • Xenocide Artwork Department
  • 5,059 posts

Posted 12 February 2010 - 05:28 PM

Could you, in theory, enter (or edit one of the useless stock vehicles) a vehicle that can be produced after tech X is researched, where the actual voxel (?) used is an alien vessel ?
simplified, research alien class x, be able to manufacture it.

It is possible to manufacture anything, UFOs included, and tech prerequisites can be edited just fine. Only problem is the limit of manufacturing entries. Only the Dimension Destabiliser is not used and can be replaced safely. Even then, there still is a problem with the UFO animations IIRC, they will only look right when under alien/AI control. But it'll work.


I need to find a suitable background image for the multiplayer part first, the one in the image (the original background from the demo in fact) uses an old palette and the buttons also aren't aligned properly. Also, only hotseat works. Well haven't really tested the network play but I'm pretty sure it won't work even without trying :)

edit: but if you REALLY can't wait: open TACP.EXE in a hex editor and go to offset 440270 (decimal, english version). It should look something like this:
C7 05 6C 72 1D 00 01 00 00 00
Replace the bold 01 in 03 and save. Next you'll need to create an image called NETSCRN.PCX and put it in the tacdata folder (just copy one of the other backgrounds in there and rename it)
Now you can play xcom apocalypse as normal, but each time you go tactical, after selecting RT or TB mode the netscreen background will pop up. Press H for a hotseat game (will always be turn-based, no matter what you choose) or S for a normal game (will be RT or TB depending on what you chose). The other options are N for network game and J for join game? Be prepared to crash xcom if you try those. You can also hunt for the buttons if you want. (somewhere near the bottom of the screen)
Note on hotseat: just follow the instructions that appear on screen. You can play with 1 player and pick the other side if you want. You can pick the same side with multiple players, but there's little point in doing so. :) It doesn't look like you can play as the civilians. Alien tech seems to work even if you haven't researched it yet, and the other problems with side swapping are also gone (brainsuckers and hyperworms spawning on the wrong side). You can equip and organize your team as normal, but only once for all players (the game remembers the 'ready' state after the first time I guess, small bug). Once you're ready, the OK button is located right next to that red bar you can also see on the screenshot.

Edited by j'ordos, 13 February 2010 - 05:37 AM.

"You can't trust your eyes if your imagination's out of focus" - Mark Twain
"The mind is like an umbrella, it functions best when open" - Walter Gropius
Posted Image
SNEKK BLOG U-LAR MEKHH! GAHGHH! RK!
GRRGH RGGHH SNORRTT GHACKHGG

Now presented in DoubleVision™ (where drunk)

#262 Zombie

Zombie

    Colonel

  • Xenocide Creative-Text Departmen
  • 2,947 posts

Posted 12 February 2010 - 10:08 PM

You can't get blood from a turnip, but j'ordos is squeezing every last drop of functionality out of Apoc. Amazing stuff. :)

- Zombie
The Mr. Grognard of X-COM

Zombie: Empirical data's your only man, when formulating a research plan.
A soldier's death is never in vain if it makes the formula more plain.
A few dozen make a better case for refining that third decimal place.
They call me Zombie because I don't sleep, as I slowly struggle to climb this heap,
of corpses, data points, and trials, but from the top - I'll see for miles!


#263 Hobbes

Hobbes

    UFO2000 Staff

  • Moderators
  • PipPipPipPip
  • 719 posts

Posted 12 February 2010 - 10:26 PM

You can't get blood from a turnip, but j'ordos is squeezing every last drop of functionality out of Apoc. Amazing stuff. :)

- Zombie


Wasn't online multiplayer one of the features that never made it into the final product? Perhaps it's there as well...

#264 j'ordos

j'ordos

    Alien Concept Task Force

  • Xenocide Artwork Department
  • 5,059 posts

Posted 13 February 2010 - 05:44 AM

I don't think they ever got anywhere near implementing netplay. The two buttons on the netscreen dialog related to that don't seem to do much. Only hotseat play is possible, and with it some awkward form of PBEM as well I guess :) (you can enter a password for your player, haven't tested yet if that actually works though)
"You can't trust your eyes if your imagination's out of focus" - Mark Twain
"The mind is like an umbrella, it functions best when open" - Walter Gropius
Posted Image
SNEKK BLOG U-LAR MEKHH! GAHGHH! RK!
GRRGH RGGHH SNORRTT GHACKHGG

Now presented in DoubleVision™ (where drunk)

#265 RagnarokX

RagnarokX

    Squaddie

  • Forum Members
  • PipPip
  • 2 posts

Posted 13 February 2010 - 10:45 AM

What would be the best way to create a shotgun like weapon ?
Are there any redundant or unused items in the agent equipment (1-3) category ?

Is it safe to edit the "EMPTY" item type at the top of agent eqipment 1 ?

edit: forget it, its no use. too much hassle in modding.

Edited by RagnarokX, 13 February 2010 - 10:59 AM.


#266 j'ordos

j'ordos

    Alien Concept Task Force

  • Xenocide Artwork Department
  • 5,059 posts

Posted 13 February 2010 - 03:38 PM

A shotgun type of weapon is impossible, unless you'd count a weapon with a short range and high damage as a shotgun. The Empty field most definately should not be edited. Try the PSI grenade or forceweb for unused weapons. Modding apocalypse isn't an easy task for sure :)
"You can't trust your eyes if your imagination's out of focus" - Mark Twain
"The mind is like an umbrella, it functions best when open" - Walter Gropius
Posted Image
SNEKK BLOG U-LAR MEKHH! GAHGHH! RK!
GRRGH RGGHH SNORRTT GHACKHGG

Now presented in DoubleVision™ (where drunk)

#267 zaimoni

zaimoni

    Sergeant

  • Forum Members
  • PipPipPip
  • 70 posts

Posted 14 February 2010 - 02:55 AM

edit: but if you REALLY can't wait: open TACP.EXE in a hex editor and go to offset 440270 (decimal, english version). It should look something like this:

C7 05 6C 72 1D 00 01 00 00 00
Replace the bold 01 in 03 and save. Next you'll need to create an image called NETSCRN.PCX and put it in the tacdata folder (just copy one of the other backgrounds in there and rename it)

Ok...Steam'ed offset appears to be 439876 (0-based origin) to locate that sequence. [edit: actually, two such offsets; other one is 439844.)

The next stage of the instructions is trickier (I don't think I'm doing this right, and the fact the bold didn't survive the original instructions doesn't help).

Edited by zaimoni, 14 February 2010 - 03:31 AM.


#268 j'ordos

j'ordos

    Alien Concept Task Force

  • Xenocide Artwork Department
  • 5,059 posts

Posted 14 February 2010 - 08:09 AM

Did a quick check, for me the steam version only returns one possible address for that hex string, at 439844. If it helps, there should be an identical hex string a little further, but with 02 instead of 01. A little further again is another identical hex string, this time with 03 instead of 01. Right the bold didn't work inside the code tag, forgot to edit that out. Doesn't really matter as there's only one 01 in that hex string.
"You can't trust your eyes if your imagination's out of focus" - Mark Twain
"The mind is like an umbrella, it functions best when open" - Walter Gropius
Posted Image
SNEKK BLOG U-LAR MEKHH! GAHGHH! RK!
GRRGH RGGHH SNORRTT GHACKHGG

Now presented in DoubleVision™ (where drunk)

#269 zaimoni

zaimoni

    Sergeant

  • Forum Members
  • PipPipPip
  • 70 posts

Posted 14 February 2010 - 10:53 AM

Did a quick check, for me the steam version only returns one possible address for that hex string, at 439844. If it helps, there should be an identical hex string a little further, but with 02 instead of 01. A little further again is another identical hex string, this time with 03 instead of 01. Right the bold didn't work inside the code tag, forgot to edit that out. Doesn't really matter as there's only one 01 in that hex string.

Confirmed (the imposters are at 439860 and 439876), but no visible effect on my end working from 439844 as base.

#270 j'ordos

j'ordos

    Alien Concept Task Force

  • Xenocide Artwork Department
  • 5,059 posts

Posted 14 February 2010 - 02:16 PM

That's odd. So you changed the hex string at 499844 from C7 05 6C 72 1D 00 01 00 00 00 into C7 05 6C 72 1D 00 03 00 00 00 and started a battle and nothing happened? Could you try searching TACP.EXE for 0F 84 73 FF FF FF 89 and change that into E9 92 00 00 00 FF 89?
Btw I converted the old netscrn.pcx image to the correct palette and uploaded it here. As I said, the buttons aren't placed correctly, pay no attention to them and use the keyboard shortcuts instead.
edit:attachment removed, the netscrn.pcx file comes with apatcher.

Edited by j'ordos, 18 May 2010 - 08:09 AM.

"You can't trust your eyes if your imagination's out of focus" - Mark Twain
"The mind is like an umbrella, it functions best when open" - Walter Gropius
Posted Image
SNEKK BLOG U-LAR MEKHH! GAHGHH! RK!
GRRGH RGGHH SNORRTT GHACKHGG

Now presented in DoubleVision™ (where drunk)

#271 zaimoni

zaimoni

    Sergeant

  • Forum Members
  • PipPipPip
  • 70 posts

Posted 15 February 2010 - 03:16 AM

That's odd. So you changed the hex string at 439844 from C7 05 6C 72 1D 00 01 00 00 00 into C7 05 6C 72 1D 00 03 00 00 00 and started a battle and nothing happened?

Correct.

Could you try searching TACP.EXE for 0F 84 73 FF FF FF 89 and change that into E9 92 00 00 00 FF 89?

Two (Steam'ed) offsets: 439678, 1192639. 439678 page-faults between choosing RT/TB and squad arrangement; 1192639 page-faults between squad arrangement and turn 1 on the battlescape. (Edit: Hmm...that substitution looks weird in assembly...going to calculate what makes sense by hand [have Intel assembly language manuals on-hand]....)

Btw I converted the old netscrn.pcx image to the correct palette and uploaded it here. As I said, the buttons aren't placed correctly, pay no attention to them and use the keyboard shortcuts instead.

Thanks.

Edited by zaimoni, 15 February 2010 - 03:32 AM.


#272 j'ordos

j'ordos

    Alien Concept Task Force

  • Xenocide Artwork Department
  • 5,059 posts

Posted 15 February 2010 - 03:48 AM

The first one looks like it should be the correct one (when I patched in that code it skipped the TB/RT selection screen and went right to the netscreen. The E9 92 00 00 00 is just a jump to the relevant code, replacing a jz a few checks before: (netplayflag is read from that 1 we changed into a 3)
cseg01:00010C7A 8B 1D 6C 72 2B+				mov	 ebx, netplayflag?
cseg01:00010C80 39 DE						  cmp	 esi, ebx
cseg01:00010C82 0F 84 73 FF FF+				jz	  loc_10BFB;I replaced this with 'jmp testnet', probably was the condition for the RT/TB selection screen loop
cseg01:00010C88 89 D8						  mov	 eax, ebx
cseg01:00010C8A 83 FB 02					   cmp	 ebx, 2
cseg01:00010C8D 72 14						  jb	  short loc_10CA3
cseg01:00010C8F 0F 86 79 00 00+				jbe	 loc_10D0E
cseg01:00010C95 83 FB 03					   cmp	 ebx, 3
cseg01:00010C98 0F 84 7B 00 00+				jz	  testnet
...
cseg01:00010D19				testnet:							; CODE XREF: sub_10AAC+1ECj
cseg01:00010D19 E8 62 F0 05 00				 call	netplay?_3
Most likely the address for the replacement jump is incorrect in the steam version, but it really should work with replacing 01 to 03 at the correct place, unless the code has been changed for some reason.

Edited by j'ordos, 15 February 2010 - 03:54 AM.

"You can't trust your eyes if your imagination's out of focus" - Mark Twain
"The mind is like an umbrella, it functions best when open" - Walter Gropius
Posted Image
SNEKK BLOG U-LAR MEKHH! GAHGHH! RK!
GRRGH RGGHH SNORRTT GHACKHGG

Now presented in DoubleVision™ (where drunk)

#273 zaimoni

zaimoni

    Sergeant

  • Forum Members
  • PipPipPip
  • 70 posts

Posted 15 February 2010 - 04:03 AM

The first one looks like it should be the correct one (when I patched in that code it skipped the TB/RT selection screen and went right to the netscreen. The E9 92 00 00 00 is just a jump to the relevant code, replacing a jz a few checks before: (netplayflag is read from that 1 we changed into a 3)

....
Most likely the address for the replacement jump is incorrect in the steam version, but it really should work with replacing 01 to 03 at the correct place, unless the code has been changed for some reason.

As for which one, would tend to agree (from when the segfault happens).

0F 84 73 FF to E9 72 FF 90 (converting 16-bit JZ to 16-bit relative JMP) segfaulted.
0F 84 73 FF FF FF to E9 72 FF FF FF 90 (converting 32-bit JZ to 32-bit relative JMP) infinite-loops after selecting TB.

So I guess this chunk of code is running as 32-bit. (Reality check: am I correct in thinking that both JMP and JZ are calculated from the start of the next instruction?)

#274 zaimoni

zaimoni

    Sergeant

  • Forum Members
  • PipPipPip
  • 70 posts

Posted 15 February 2010 - 04:19 AM

The first one looks like it should be the correct one (when I patched in that code it skipped the TB/RT selection screen and went right to the netscreen. The E9 92 00 00 00 is just a jump to the relevant code, replacing a jz a few checks before: (netplayflag is read from that 1 we changed into a 3)

cseg01:00010C7A 8B 1D 6C 72 2B+				mov	 ebx, netplayflag?
cseg01:00010C80 39 DE						  cmp	 esi, ebx
cseg01:00010C82 0F 84 73 FF FF+				jz	  loc_10BFB;I replaced this with 'jmp testnet', probably was the condition for the RT/TB selection screen loop
cseg01:00010C88 89 D8						  mov	 eax, ebx
cseg01:00010C8A 83 FB 02					   cmp	 ebx, 2
cseg01:00010C8D 72 14						  jb	  short loc_10CA3
cseg01:00010C8F 0F 86 79 00 00+				jbe	 loc_10D0E
cseg01:00010C95 83 FB 03					   cmp	 ebx, 3
cseg01:00010C98 0F 84 7B 00 00+				jz	  testnet
...
cseg01:00010D19				testnet:						; CODE XREF: sub_10AAC+1ECj
cseg01:00010D19 E8 62 F0 05 00				 call	netplay?_3
Most likely the address for the replacement jump is incorrect in the steam version, but it really should work with replacing 01 to 03 at the correct place, unless the code has been changed for some reason.

D'OH

01 : RT
02 : TB

I was clicking TB consistently. Replacing both 01 starting from 439844, and 02 starting from 439860, with 03 worked.

#275 j'ordos

j'ordos

    Alien Concept Task Force

  • Xenocide Artwork Department
  • 5,059 posts

Posted 15 February 2010 - 04:48 AM

Ah, I always chose RT habitually... Still I was pretty sure I tried TB as well one time and it still worked. But you're indeed right, only when you choose RT mode does the netscrn work in this way. Have to change the 02 as well. Good to know!
"You can't trust your eyes if your imagination's out of focus" - Mark Twain
"The mind is like an umbrella, it functions best when open" - Walter Gropius
Posted Image
SNEKK BLOG U-LAR MEKHH! GAHGHH! RK!
GRRGH RGGHH SNORRTT GHACKHGG

Now presented in DoubleVision™ (where drunk)

#276 zaimoni

zaimoni

    Sergeant

  • Forum Members
  • PipPipPip
  • 70 posts

Posted 20 February 2010 - 07:55 PM

In Edit Agents (main savegame), it would be nice if edits to the Agent Inventory backpointer index were actually saved. (This is not a transparent fix; I think I can read FreeBASIC well enough, but it's still not obvious where the edits are being ignored/overwritten on save.)

Currently, I'm having to jump between Edit Agents and Edit Agent Inventory when swapping agents. My ultimate object is to swap the agent inventory backpointers when swapping agents.

Edited by zaimoni, 20 February 2010 - 08:03 PM.


#277 j'ordos

j'ordos

    Alien Concept Task Force

  • Xenocide Artwork Department
  • 5,059 posts

Posted 21 February 2010 - 03:17 PM

shuckeroonies, though this was working correctly! I solved the backpointers not being saved problem (default pointer was set to 0 during reading, which caused the update_sagentinvref sub to not give a proper offset for the inventory with a pointer to agent id #0. Other cases worked fine here in all tests though. Still working on a quick fix for the swapping (can't believe I didn't notice that wasn't going to work)
"You can't trust your eyes if your imagination's out of focus" - Mark Twain
"The mind is like an umbrella, it functions best when open" - Walter Gropius
Posted Image
SNEKK BLOG U-LAR MEKHH! GAHGHH! RK!
GRRGH RGGHH SNORRTT GHACKHGG

Now presented in DoubleVision™ (where drunk)

#278 zaimoni

zaimoni

    Sergeant

  • Forum Members
  • PipPipPip
  • 70 posts

Posted 21 February 2010 - 04:32 PM

Units section, tactical save:
Unknown 73/74/75: X,Y,Z #0
Unknown 96/97/98: X,Y,Z #1
Unknown 100/101/102: X,Y,Z #2
Unknown 121/122/123: X,Y,Z #3
Unknown 254/255/256: X,Y,Z #4

#1, #2, and #3 appear to be "scratch" (they cause no visible or internal effects when edited in isolation).

Editing #4 causes a waypoint marker to show up at the edited location. No movement, though (that's somewhere else).

Editing #0 teleports the unit. #2 is updated to the values at #0 by load-save. #4 is not updated by load-save, resulting in a waypoint marker.

Edited by zaimoni, 21 February 2010 - 04:49 PM.


#279 zaimoni

zaimoni

    Sergeant

  • Forum Members
  • PipPipPip
  • 70 posts

Posted 21 February 2010 - 04:39 PM

shuckeroonies, though this was working correctly! I solved the backpointers not being saved problem (default pointer was set to 0 during reading, which caused the update_sagentinvref sub to not give a proper offset for the inventory with a pointer to agent id #0. Other cases worked fine here in all tests though. Still working on a quick fix for the swapping (can't believe I didn't notice that wasn't going to work)

Hmm...all inventory slots had equally unupdateable backpointers requiring going to Agent Inventory on my end. The 0-index only bug was the agent's *name* (swapping with 0 didn't update that, but did update at the other end...minor annoyance, bypass in Apocalypse).

#280 j'ordos

j'ordos

    Alien Concept Task Force

  • Xenocide Artwork Department
  • 5,059 posts

Posted 21 February 2010 - 07:27 PM

Thanks for the extra information! Agent cross referencing seems to be working fine here at least, so I updated the version: http://www.xcomufo.c...t=0#entry153573. Swapping should also work now. That bug with 0 couldn't have been just the name as it didn't get a proper offset which is used by apoc'd to save that data!
By the way, what do I need to do to get a proper 16x16 icon in the top-right corner of the window/taskbar for apoc'd?
"You can't trust your eyes if your imagination's out of focus" - Mark Twain
"The mind is like an umbrella, it functions best when open" - Walter Gropius
Posted Image
SNEKK BLOG U-LAR MEKHH! GAHGHH! RK!
GRRGH RGGHH SNORRTT GHACKHGG

Now presented in DoubleVision™ (where drunk)

#281 zaimoni

zaimoni

    Sergeant

  • Forum Members
  • PipPipPip
  • 70 posts

Posted 22 February 2010 - 12:49 AM

Thanks for the extra information! Agent cross referencing seems to be working fine here at least, so I updated the version: http://www.xcomufo.c...t=0#entry153573. Swapping should also work now. That bug with 0 couldn't have been just the name as it didn't get a proper offset which is used by apoc'd to save that data!

Twilight Zone. I know that stats, rank, kills, and facial icon were swapping properly when agent slot 0 was being swapped on Win7/64-bit.

By the way, what do I need to do to get a proper 16x16 icon in the top-right corner of the window/taskbar for apoc'd?

It's a pair of Windows API calls. Looking at Zaiband C-ish source code:
if (hPrevInst == NULL)
{
	wc.style		 = CS_CLASSDC;
	wc.lpfnWndProc   = AngbandWndProc;
	wc.cbClsExtra	= 0;
	wc.cbWndExtra	= 4; /* one long pointer to term_data */
	wc.hInstance	 = hInst;
	wc.hIcon		 = hIcon = LoadIcon(hInst, "ANGBAND");
	wc.hCursor	   = LoadCursor(NULL, IDC_ARROW);
	wc.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
	wc.lpszMenuName  = "ANGBAND";
	wc.lpszClassName = AppName;

	if (!RegisterClass(&wc)) exit(1);

	/* .... */
}
The one that sets up the icon is LoadIcon; the one that actually gets the icon on the program is RegisterClass. If there's no obvious FreeBASIC-specific tutorials, I recommend researching these for C at MSDN [Microsoft Developer Network], then using FreeBASIC's exposing most of the Windows API to set up using these Windows API functions.

(No, I didn't write that: Zaiband is a quiescent alpha fork of Vanilla Angband 3.0.6.)

Edited by zaimoni, 22 February 2010 - 12:50 AM.


#282 j'ordos

j'ordos

    Alien Concept Task Force

  • Xenocide Artwork Department
  • 5,059 posts

Posted 22 February 2010 - 10:54 AM

Thanks for the info, there's a windows include file for Freebasic that lets me do that (windows.bi), I'll take a look!

I can play rogue and Doom the roguelike in textmode but for more complex roguelikes I prefer the UI provided to me by ZangbandTK, even if it is outdated. :)
edit: bleh, simply pasting in that window class (leaving out lpfnWndProc) and calling registerclass didn't work, I'll probably need to create thw window properly... But I'd rather work on better DOS compatibility instead.

Edited by j'ordos, 22 February 2010 - 12:04 PM.

"You can't trust your eyes if your imagination's out of focus" - Mark Twain
"The mind is like an umbrella, it functions best when open" - Walter Gropius
Posted Image
SNEKK BLOG U-LAR MEKHH! GAHGHH! RK!
GRRGH RGGHH SNORRTT GHACKHGG

Now presented in DoubleVision™ (where drunk)

#283 KayDat

KayDat

    Rookie

  • New Forum Members
  • Pip
  • 0 posts

Posted 06 March 2010 - 03:04 AM

Hey j'ordos, I'm trying out the Megapol mod right now, and it seems pretty sweet. I'm curious, where are the offsets for changing the cargo/biotrans module? I ask, because I did a fix on my own Xcom install the other way; swapping the imaged within the VEHEQUIP.PCK file with XED/pckmanip. This stood out because, with both modifications combined, it reverted back to the incorrect original swapped config :P
I ask because I've been spending the day trying to figure out how to get "illegal" vehicles to show up in the vehicle equip screen. I had originally thought that it was simply the same issue as a the missing .pcx background image, so I tried to add extra imaged to BIGVEH.PCK by duplicating offsets in BIGVEH.TAB, but nothing came of it. There doesn't seem to be anything within the vehicles section that determines which image to use for each vehicle from BIGVEH.PCK, so where is it? Thanks in advance. =]

Edit: Well silly me, it's in the Vehicle equipment section. Question still stands about the vehicle icon in equip mode though.

Edit2: Unknown 39 in Vehicles is 1 on all except the main X-Com gunships; Interceptor, Hawk, Retaliator and Annihilator. Dunno if that means anything though.

Edit3: Man...Apoc is a very incomplete game...the developers were very ambitious. I think there were even plans to include adjustments to wages. The mention of wages is at 1380007 on my UFO2P.exe. Just digging through to see if I can change all mentions of X-COM to Megapol. Since I am very new to Hex editing, it's not very successful. The best I can do is replace X-COM with something that has the same length of characters, so MGPOL or M-Pol.

Edit4: Unknown 100 in Saved game Vehicle is analogous to Image in Cityscape Vehicle. I guess the game takes the variable in Cityscape when the vehicle is generated/bought, and sticks it to the save game vehicle stat. So when you change the stat in Cityscape, vehicles you already own aren't affected.

Edited by KayDat, 06 March 2010 - 10:40 AM.


#284 j'ordos

j'ordos

    Alien Concept Task Force

  • Xenocide Artwork Department
  • 5,059 posts

Posted 06 March 2010 - 01:38 PM

So unknown 100 defines the top down image of a vehicle in the equip screen? Good to know, being able to have extra pics for the illegal vehicles would be nice though, still hoping to find that some day.
"You can't trust your eyes if your imagination's out of focus" - Mark Twain
"The mind is like an umbrella, it functions best when open" - Walter Gropius
Posted Image
SNEKK BLOG U-LAR MEKHH! GAHGHH! RK!
GRRGH RGGHH SNORRTT GHACKHGG

Now presented in DoubleVision™ (where drunk)

#285 KayDat

KayDat

    Rookie

  • New Forum Members
  • Pip
  • 0 posts

Posted 06 March 2010 - 03:29 PM

No, I think it defines the image (or sets of images) used in isometric view. I still haven't figured out what offset is used for equip image =)
Of course, this is just my guess, since Unknown 100 (save game) and Image (cityscape) both have the same, matching numbers between different vehicles. For example, 503 for intercepter, IIRC. I haven't done extensive testing, I posted just before I went to bed and I just got up. =)

Edit: BTW, do you know which palette files correspond to whick pck files? For example, bigveh.pck and VEHEQUIP.PCK both look fine in XeD, but look funky after export. While it's fine again after import, it's not too ideal for photo/colour manipulation.

Edit2: Yep, just tested to confirm. Unknown 100 in save games is the same as Cityscape/UFO2P->Vehicle->Image. It only affects isometric view, the hunt continues for equip images. Which also raises the question, how about the vehicle logos in cityscape?

Edited by KayDat, 06 March 2010 - 09:11 PM.


#286 KayDat

KayDat

    Rookie

  • New Forum Members
  • Pip
  • 0 posts

Posted 07 March 2010 - 02:44 PM

I found it...I'm sorry about the double post, but I think this deserves a post by itself :D Spent all night wracking my brains (And I think I was even dreaming about offsets and whatnot...), and when I got up in the morning, I found it within 5 minutes, it was staring me in the face.
Offsets 1397914 to 1397980 are the offsets for vehicle equip images. All I needed to do was search for the image numbers of bigveh.pcx/smallveh.pcx for each vehicle in order; Pheonix, Hoverbike, Interceptor, Hawk, Dimprobe, Biotrans, Explorer, Retaliator, Annihilator. Specifically, it would be
05 00 0A 00 04 00 0B 00 06 00 03 00 09 00 07 00 00 00
for the air vehicles. Thank God they didn't have the vehicles all lined up in order int he pcx, making the search easier, a blessing in disguise I suppose :D
Oh man, I'm so estatic. :)

Edit: Okay, here's a modified bigveh smalveh .pck/.tab, ready for you to modify with your own images. Main thing I did was modify the .tab files to allow for importing of additional images. Images 0-12 are still the default ones, 13-27 are open to use; they're biotrans in bigveh and random vehicles in smalveh, IIRC. Chuck it in your UFODATA, and modify your UFO2P to address them to see if it works. I'm still trying to figure out where the correct palette is so I can export and import in correct colours so I can manipulate them in Photoshop.
Attached File  VEHEQUIP.rar   21.01K   29 downloads
Edit2: Damn, this colour palette thing is hard to crack. So bigveh.pck/smalveh.pck takes its palette from the vehicle background image being used (should have known, I experienced this when I was mucking around with the agent background equip image), but I can't figure out how its mapped out.

Edit3: Sweet, I got the palette. Turns out the palette in the PCX files, when opened in Photoshop, are reversed. So this palette is for the vehicle icons, bigveh and smalveh. Colour tables are saved as .ACT files in photoshop, but are the same as the .PAL/.DAT files in the game.
vehicle_pal.png
Attached File  palette.rar   815bytes   27 downloads
The colour choice is a little limiting, and there are a whole bunch of colours not being used (All the magenta/purple and the few checkered ones at the end). We can introduce more colours into the blocks not being used, but then we'd have to edit every vehicle background pcx file as well. Not that hard, but just more things to do.

Edit4: Some samples: default red Pheonix with colour table/palette applied, and a modified blue pheonix.
pheonix_red.png
pheonix_blue.png

Edit5: Looks like the first colour block in the palette is mapped as the background colour. It's only for our personal viewing, but you can choose to map it to black if you want. As long as the background colour is the first colour in the palette, it will be transparent anyway (unless you have the vehicle selected in the equip screen; then it's just black), so I figure magenta is fine. It's used as the colour to represent transparent in some other formats as well anyway. Hope this helps you out with your Megapol conversion, let me know if you need any help with anything. At this point in time, I think my Photoshop skills are still better than my programming/hex skills. :P

Edited by KayDat, 08 March 2010 - 10:39 AM.


#287 j'ordos

j'ordos

    Alien Concept Task Force

  • Xenocide Artwork Department
  • 5,059 posts

Posted 08 March 2010 - 08:33 AM

Excellent work Kaydat! I'll add the new data to apoc'd asap. This will be a huge help to anyone modding apocalypse.
About the vehicle icons: since their order in the PCK file matches the vehicle list completely it just depends on the 'vehicle type'.

That blue hovercar would work fine for the police hovercar image in the megapol mod :)
"You can't trust your eyes if your imagination's out of focus" - Mark Twain
"The mind is like an umbrella, it functions best when open" - Walter Gropius
Posted Image
SNEKK BLOG U-LAR MEKHH! GAHGHH! RK!
GRRGH RGGHH SNORRTT GHACKHGG

Now presented in DoubleVision™ (where drunk)

#288 KayDat

KayDat

    Rookie

  • New Forum Members
  • Pip
  • 0 posts

Posted 08 March 2010 - 10:36 AM

Here's a palette file to use for any .PCK file that relies on PAL_01.DAT. Useful if you want to view exports from files such as SAUCER.PCK, since PAL_01.DAT seems to be quite dark outside the game. Again, X-COM .PAL files are the same as .ACT colour table files.
Attached File  cityveh.rar   731bytes   23 downloads

Edit: Man, I wish the attachment program of the forum worked in Chrome, I don't like working in IE =[

Edited by KayDat, 08 March 2010 - 11:05 AM.


#289 j'ordos

j'ordos

    Alien Concept Task Force

  • Xenocide Artwork Department
  • 5,059 posts

Posted 08 March 2010 - 11:15 AM

Depending on how the day/night transition works, it could be that it looks darker because xcom adds to the base colors during full day to make everything appear brighter.
Apoc'd has been updated, the top-down icon has been added to the vehicles section. It just occurs to me that I forgot to check if the overspawn actually can even have one though. http://www.xcomufo.c...t=0#entry153573
edit: works fine in Opera :)

Edited by j'ordos, 08 March 2010 - 11:15 AM.

"You can't trust your eyes if your imagination's out of focus" - Mark Twain
"The mind is like an umbrella, it functions best when open" - Walter Gropius
Posted Image
SNEKK BLOG U-LAR MEKHH! GAHGHH! RK!
GRRGH RGGHH SNORRTT GHACKHGG

Now presented in DoubleVision™ (where drunk)

#290 KayDat

KayDat

    Rookie

  • New Forum Members
  • Pip
  • 0 posts

Posted 08 March 2010 - 11:27 AM

Depending on how the day/night transition works, it could be that it looks darker because xcom adds to the base colors during full day to make everything appear brighter.


Ooohhh, that's a good point. Well, night would just be darker, I'd rather edit as you see it during the day. The game will see it the same anyway, it's just the palette for our own viewing. :)

Edit: I'm curious, why don't you put the version number in the archive/program file name? I figure it'd be easier to see at a glance which Apoc'd version without having to run it.

Edited by KayDat, 08 March 2010 - 11:33 AM.


#291 j'ordos

j'ordos

    Alien Concept Task Force

  • Xenocide Artwork Department
  • 5,059 posts

Posted 08 March 2010 - 12:23 PM

Is there any need for the version number to be visible from within the archive?
"You can't trust your eyes if your imagination's out of focus" - Mark Twain
"The mind is like an umbrella, it functions best when open" - Walter Gropius
Posted Image
SNEKK BLOG U-LAR MEKHH! GAHGHH! RK!
GRRGH RGGHH SNORRTT GHACKHGG

Now presented in DoubleVision™ (where drunk)

#292 KayDat

KayDat

    Rookie

  • New Forum Members
  • Pip
  • 0 posts

Posted 08 March 2010 - 08:55 PM

Sorry, I meant both the archive name and the program executable. You wouldn't need to see the version number from within the archive, but you wouldn't have to rename the file to reflect the version every time you extract it. Also means you can see which version you have in your X-Com folder at a glace.

#293 j'ordos

j'ordos

    Alien Concept Task Force

  • Xenocide Artwork Department
  • 5,059 posts

Posted 09 March 2010 - 02:02 AM

Hmm, I can't consider the extra work that would mean for me each release worth it though, sorry :)
"You can't trust your eyes if your imagination's out of focus" - Mark Twain
"The mind is like an umbrella, it functions best when open" - Walter Gropius
Posted Image
SNEKK BLOG U-LAR MEKHH! GAHGHH! RK!
GRRGH RGGHH SNORRTT GHACKHGG

Now presented in DoubleVision™ (where drunk)

#294 syzor

syzor

    Rookie

  • New Forum Members
  • Pip
  • 0 posts

Posted 16 March 2010 - 09:07 PM

Just as the research of physics finds smaller and smaller things infinitely j'ordos finds more detail in the apoc code, impressive.

#295 Ringo

Ringo

    Rookie

  • New Forum Members
  • Pip
  • 0 posts

Posted 18 April 2010 - 01:42 AM

Great work, man! :)
I tried some of new features such as inventory icon for vehicle. Thinking about making icons for all of vehicles (UFOs, civ cars and others)

PS>
Someone tried to own Space Port?
It's very fun, cuz every time when to spaceport arrives Space Liner you owns it (:

PPS>
It will be very nice if after raiding soe organization you became the owner of building you raided (:

Edited by Ringo, 19 April 2010 - 12:39 AM.


#296 j'ordos

j'ordos

    Alien Concept Task Force

  • Xenocide Artwork Department
  • 5,059 posts

Posted 22 April 2010 - 05:47 PM

Thanks! I released a new version adding starting craft ammo&fuel. Unfortunately it seems this will be the only editable starting equipment (together with starting facilities) as the others are hardcoded. This includes the vehicles, their equipment, the starting lasers&grenades and the default agent equipments.
Cool trick with the spaceport, makes for a lot of free ca$h :) I don't think it will be possible to shift ownership after raids unless I also create a loader like seb76 for xcom1 (or rather a TSR since we're talking dos here?)

edit: reuploaded version as I forgot to reset the path

Edited by j'ordos, 27 April 2010 - 10:50 AM.

"You can't trust your eyes if your imagination's out of focus" - Mark Twain
"The mind is like an umbrella, it functions best when open" - Walter Gropius
Posted Image
SNEKK BLOG U-LAR MEKHH! GAHGHH! RK!
GRRGH RGGHH SNORRTT GHACKHGG

Now presented in DoubleVision™ (where drunk)

#297 j'ordos

j'ordos

    Alien Concept Task Force

  • Xenocide Artwork Department
  • 5,059 posts

Posted 28 April 2010 - 07:45 PM

Another new version! Now you can edit the daily raids&illegal flyer actions. There's a few actions labeled as 'unused'. These really don't do anything, Ive seen the code. The unknown types do something but I have no clue what. There was supposed to be an illegal road vehicle action and some VIP related attacks, guess those are leftovers. There's no 'raid xcom base' action, you can only hope the random number generator picks out your base.
On a somewhat related note, I now know for sure that the increased illegal vehicles patch in apatcher works. :)
"You can't trust your eyes if your imagination's out of focus" - Mark Twain
"The mind is like an umbrella, it functions best when open" - Walter Gropius
Posted Image
SNEKK BLOG U-LAR MEKHH! GAHGHH! RK!
GRRGH RGGHH SNORRTT GHACKHGG

Now presented in DoubleVision™ (where drunk)

#298 j'ordos

j'ordos

    Alien Concept Task Force

  • Xenocide Artwork Department
  • 5,059 posts

Posted 14 May 2010 - 07:40 AM

By the way, I created a little tool to aid in editing the UFOPaedia entries: paedind v1.
Put it in the ufopaedia folder and it will scan the paedia.mt file and update the mti index file afterwards. Use a hex editor to edit the text entries inside paedia.mt to your liking. Note that saving the file using notepad or word will destroy the formatting so you have to use a hex editor.
It's rudimentary at best but it allows us to increase the length of UFOPaedia entries, and that's what matters no? :)

edit: also released v3.05b a few days ago, since I forgot to add the 486&german version offsets for most new sections. Sorry! :sorry:
http://www.xcomufo.c...topic=242028524

Attached Files


Edited by j'ordos, 14 May 2010 - 07:43 AM.

"You can't trust your eyes if your imagination's out of focus" - Mark Twain
"The mind is like an umbrella, it functions best when open" - Walter Gropius
Posted Image
SNEKK BLOG U-LAR MEKHH! GAHGHH! RK!
GRRGH RGGHH SNORRTT GHACKHGG

Now presented in DoubleVision™ (where drunk)

#299 j'ordos

j'ordos

    Alien Concept Task Force

  • Xenocide Artwork Department
  • 5,059 posts

Posted 11 June 2010 - 03:59 PM

Exams ended early this year, which is bad news for apoc'd as that is my most productive time of the year, but I did make some progress. Version 3.06a has a unique feature: the very first battlescape only section! Now you can edit which damage types pass through shields and which don't. http://www.xcomufo.c...topic=242028524 for download and full list of new features.
"You can't trust your eyes if your imagination's out of focus" - Mark Twain
"The mind is like an umbrella, it functions best when open" - Walter Gropius
Posted Image
SNEKK BLOG U-LAR MEKHH! GAHGHH! RK!
GRRGH RGGHH SNORRTT GHACKHGG

Now presented in DoubleVision™ (where drunk)

#300 Ringo

Ringo

    Rookie

  • New Forum Members
  • Pip
  • 0 posts

Posted 13 June 2010 - 11:59 AM

I found that xcomapoc saves map ( all 4 map-related files) in the tactical savegame.
IT would be very nice if you make viewer for tact-savegames, it will make unit movement more comfortable...