Jump to content


Photo

New X-COM Hack


  • Please log in to reply
51 replies to this topic

#1 hatfarm

hatfarm

    Sound Department

  • Xenocide Sound Department
  • 133 posts

Posted 18 August 2009 - 03:54 PM

So, after some thought, I think I am going to restart from zero and try to rebuild x-com hack and add some new functionality. I will also try to make it more streamlined, when I wrote that program I really had no idea what I was doing as far as efficiency goes. So now, I have some experience writing some very basic 2d games and feel I have the ability to actually write something decent. I could use some help though, it was long ago requested that I add graphics to it, especially in the base editing portion, which I would love to do, but I need to get the graphics for all of the parts of the base. Does anyone have any copies of just the images for the base units that I could use in my base editor? I'm going to start cranking it out and work on the parts I can quickly, but I won't release it until it has at least as many features if not more than version 2.5. Also, is there anything in particular people would like to see added to it? I haven't really dug into ufopaedia to check out what all the new stuff that has been found does, I will be doing that though, and if anyone has anything they'd like me to start with, I'd be glad to do that. As always, if anyone is interested in coding this as well, just let me know and I'll be glad to figure out a way to work with you, I will be using vb.net. Thanks ahead of time for any and all help.

Edited by hatfarm, 18 August 2009 - 05:56 PM.


#2 Zombie

Zombie

    Colonel

  • Xenocide Creative-Text Departmen
  • 2,947 posts

Posted 18 August 2009 - 06:15 PM

You can get in-game pics for all the base facilities at the UFO Base Kit page at the X-COM wiki. :)

I'd really like to see updated functionality for editing crafts and craft weapons. Right now you only allow ammo quantities up to 100, but technically you can crank ammo quantities up to 32,767 as that variable is a 2-byte signed integer. I did a lot of work in this area decoding some stuff so any extra features from CRAFT.DAT would be appreciated. ;)

I'd also like the ability to edit one soldier and apply those stats to everyone in my team. That's a handy feature. Also, the ability to edit melee accuracy would be cool. ^_^

- 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!


#3 hatfarm

hatfarm

    Sound Department

  • Xenocide Sound Department
  • 133 posts

Posted 18 August 2009 - 11:38 PM

Awesome, thanks for the info, I've got all the pictures I need now. Also, I will be working on the "Apply All" option to the soldier, as well as taking a look at what I can do about improving the craft editing. I'm starting small and trying to make sure I do everything I can as efficiently as possible, so it may take me a while to finish this, but I am working on it and hope I can get it done somewhat soon.

#4 hatfarm

hatfarm

    Sound Department

  • Xenocide Sound Department
  • 133 posts

Posted 21 August 2009 - 08:17 AM

Hey Zombie, quick question. In craft.dat you ufopaedia has byte 4 listed as what the craft is doing, but on my site I have it listed as the center weapon. Does that mean that there is no "center weapon?" Does the lightning then only have access to the left weapon, or the right? This makes sense, I just want to make sure I enable the right one in the new version. Thanks a lot for your work on these files.

#5 hatfarm

hatfarm

    Sound Department

  • Xenocide Sound Department
  • 133 posts

Posted 21 August 2009 - 03:59 PM

Nevermind on that question, I see it in the notes in the ufopaedia. That's what I get for quickly glancing through it. In case you're wondering how it's coming along, it's going pretty well. I probably won't finish it by the time school starts back up (this coming wednesday) because I have to work so much and we have family in this weekend. So that will slow down the pace, but a lot of the hard stuff to figure out has been done (like rendering the graphics and getting certian things to act the way I want them to). So far, the base editor is 95% done, as well as a lot of the class structure and everything. The base layout is exactly like the one you see in the game, so it should be pretty straight forward. I'm basically making a seperate class for every little thing so it should be easy to dig in and fix anything that may be broken. It's already much more efficient and less of a headache than the older versions (user and programmer wise) so that's good.

One more question for you though, was editing the contents of the stores in the base a big hassle before? I never had a problem with it, but I wanted to make sure that that was an okay way to do it before I go ahead and do it that way again. Can anyone think of a better way to do it? Was there anything about any part of the program that seemed like there might just be a better way to do it? I know for the soldier editor I'm going to have a display of what each soldier looks like so that when you're changing settings, you can see what the changes will look like. I will be including the apply all option, I'm debating whether or not to allow you to apply all to only specific attributes (I may just leave that option for a later version).

I'm also considering adding in the functionality for editing the executable into just x-com hack so you could just go to one place to do all of the editing. I see that Zombie has put together a huge list of knowns on the executables, so that'd be a great asset to building that. Thanks for all the work that you've done decoding these files, I'll try to find more if I can.

#6 Zombie

Zombie

    Colonel

  • Xenocide Creative-Text Departmen
  • 2,947 posts

Posted 21 August 2009 - 06:06 PM

Hey Zombie, quick question. In craft.dat you ufopaedia has byte 4 listed as what the craft is doing, but on my site I have it listed as the center weapon. Does that mean that there is no "center weapon?" Does the lightning then only have access to the left weapon, or the right? This makes sense, I just want to make sure I enable the right one in the new version. Thanks a lot for your work on these files.

Aye, the Lightning doesn't have a center weapon hardpoint, only a left. Hehe, CRAFT.DAT was one of those files where it's pretty easy to decode most of the unknowns simply by looking at the craft stats in-game. There are still a few unknowns yet, but maybe Seb can shed some light on the subject sometime. :)

One more question for you though, was editing the contents of the stores in the base a big hassle before? I never had a problem with it, but I wanted to make sure that that was an okay way to do it before I go ahead and do it that way again. Can anyone think of a better way to do it? Was there anything about any part of the program that seemed like there might just be a better way to do it? I know for the soldier editor I'm going to have a display of what each soldier looks like so that when you're changing settings, you can see what the changes will look like. I will be including the apply all option, I'm debating whether or not to allow you to apply all to only specific attributes (I may just leave that option for a later version).

Editing the stores was kinda a hassle before. Having to type the number you want in a separate pop-up window for every item really slowed things down. Not to mention that once you clicked OK, the base stores list would automatically jump to the beginning instead of staying where it was. If you could cut out the pop-ups all together, you would have a superb editor.

I'm also considering adding in the functionality for editing the executable into just x-com hack so you could just go to one place to do all of the editing. I see that Zombie has put together a huge list of knowns on the executables, so that'd be a great asset to building that. Thanks for all the work that you've done decoding these files, I'll try to find more if I can.

Hehe, didn't I send you that spreadsheet with the executable knowns a while back? Eh, never mind. :wink1: You may want to consider adding executable editing functionality for all the versions of the game. If so, contact Jenny at this board because she did the same thing with her editor recently. :)

- 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!


#7 hatfarm

hatfarm

    Sound Department

  • Xenocide Sound Department
  • 133 posts

Posted 21 August 2009 - 11:44 PM

Hehe, didn't I send you that spreadsheet with the executable knowns a while back? Eh, never mind. :wink1: You may want to consider adding executable editing functionality for all the versions of the game. If so, contact Jenny at this board because she did the same thing with her editor recently. :)


You may have sent it to my old e-mail address. It was at stonepool.com which is still technically active, but it gets so much spam I don't check it anymore. Yeah, I would add functionality for all of the versions. I know that my old exe editor can do most of the versions. It's all about finding where the offsets change and such. I would also like to rewrite the patch making/applying version of that program because that was the part of that program I was most happy with. I think when you see the new version you'll be happy with it. I'm trying to remove as many of the screen switching as I can. Thanks for your notes, if you think of anything else, please let me know.

#8 hatfarm

hatfarm

    Sound Department

  • Xenocide Sound Department
  • 133 posts

Posted 29 August 2009 - 09:57 AM

Just another quick update, I'm almost completely done with the base editor now. I had to rewrite some code to be more memory efficient (there are places to make it even more efficient, but I'm going to wait until I've finished v3.0 to fix that, because it'll take some time). I've fixed a few major problems that existed before. First of all, adding radars/hyperwave decoders to your base was not giving you an actual boost in detection, that's because the proper values were not being updated, this is fixed, I've got the program just doing the calculations for you when you add the detectors, so you shouldn't have any problems with that now. I think after you finished building something really in the game, it would fix those for you, but now you don't have to worry about it. The reason the base editor has taken so long is because I wanted to make everything editable from the same screen, so I just have each editor drawn to the one window, but that forces me to create some new controls, reinvent the wheel a little bit, so that has taken some time. However, the rest of the editors will use mostly the same things, so it shouldn't be as much of a slow down on the other editors. Any other ideas from users would be greatly appreciated. Thanks.

#9 JINZONINGEN 73

JINZONINGEN 73

    Squaddie

  • Forum Members
  • PipPip
  • 1 posts

Posted 03 September 2009 - 03:04 AM

Also, is there anything in particular people would like to see added to it?

An editor for people like me with zero experience in hacking.

I want to be able to quickly and easily change the research images, redraw the characters, and add my own sound effects in.

Mainly, I want to do a Beavis and Butthead version where the enemies are all BnB characters.


Imagine it... "Tom Anderson Autopsy"... how cool would that be!?!

#10 hatfarm

hatfarm

    Sound Department

  • Xenocide Sound Department
  • 133 posts

Posted 03 September 2009 - 10:51 AM

An editor for people like me with zero experience in hacking.

I want to be able to quickly and easily change the research images, redraw the characters, and add my own sound effects in.

Mainly, I want to do a Beavis and Butthead version where the enemies are all BnB characters.


Imagine it... "Tom Anderson Autopsy"... how cool would that be!?!


Hmm... I don't know if I'll be able to add an editor for the actual graphics and sound in the game (at best it'd be able to import those things), but I'll consider it. The first part I'm focused on is the saved game editor. Once I'm done with that, I'll add on the EXE editor. I'll also try to add in a TFTD portion of saved game editing (possibly before the EXE editor). The progress on this program is happening a bit faster now, because I've learned some things that make it MUCH easier to add controls and stuff dynamically, so it looks pretty good so far. The base editor is done, I will eventually make it a bit more memory efficient, but it's not really a hog right now, and the whole program shouldn't be a problem memory wise anyway.

I've started work on the soldier editor, it shouldn't take too long given the lessons I learned from the base editor part. I'm trying to make it as graphical as possible so all of the soldier/base/craft graphics will be included (hopefully this doesn't get me sued). I may post some screen shots to see what people think of the appearance so I can make changes before I've finalized everything.

#11 hatfarm

hatfarm

    Sound Department

  • Xenocide Sound Department
  • 133 posts

Posted 07 September 2009 - 11:29 AM

Just a quick update, I was a bit wrong about the soldier.dat editing being quicker, mostly because I wanted to make the base and craft values editable and since they are references to other files and such, I had to figure out a way to implement them in that way and make it somewhat intuitive to the user. Now though, when you select a base, it will point to the correct base in loc.dat and if you select a new craft to put the soldier on, it will update with the value corresponding to that craft, as well as putting that soldier in the correct base for that craft. It also will list what type of craft, and the number on it, so it will say something like "Skyranger-1" or "Lightning-4" and it SHOULD point to the correct info in the game.

I've done some testing, but of course I'm not going to be able to simulate all possibilities. So, I think when I'm finished with the soldier editor I'll make a beta release so if anyone is willing to test it, they can. Then I'll release a new beta for every other editor I finish until I'm done, obviously. When I post the betas, I'll create a new topic for each one so I can get bug reports from anyone who wants to test. Thanks ahead of time for any and all help.

#12 hatfarm

hatfarm

    Sound Department

  • Xenocide Sound Department
  • 133 posts

Posted 10 September 2009 - 10:47 AM

I've just finished the code for allowing the user to install the program anywhere, and it'll let you pick exactly which game you want to load from that directory. There is no functionality for executable editing, but it does make you select the location of the executable (you can go to ufo.exe or geoscape/battlescape.exe), and it will remember the directory you used for future reference. I'm about 50% done with the soldier editor, it should actually go pretty quickly though, because it will mostly be the same code with just a modified offset. The hard part was checking the base and craft references against each other to make sure they matched up, which they now should, so with that behind me, should be smooth sailing.

On a side note, does anyone know where I can get pictures of the TFTD aquanauts, base tiles and crafts? I also need recommendations on what the best picture for the crafts would be. I've thought about using the overhead picture like the one from the battle screen, but I could also use the UFOPaedia version. Thanks.

#13 Zombie

Zombie

    Colonel

  • Xenocide Creative-Text Departmen
  • 2,947 posts

Posted 10 September 2009 - 04:06 PM

On a side note, does anyone know where I can get pictures of the TFTD aquanauts, base tiles and crafts? I also need recommendations on what the best picture for the crafts would be. I've thought about using the overhead picture like the one from the battle screen, but I could also use the UFOPaedia version. Thanks.

For the Aquanauts, you can find those images in the UFOGRAPH folder under MAN_0F0.SPK to MAN_3.SPK. They are in SPK format so you'll need a utility to yank them out to something usable. I'd suggest Bomb Blokes Toolbox. For the facilities, they are found in the GEOGRAPH folder under BASEITS.PCK. BB's utility should work for extracting these images too. :)

My recommendation for the crafts would be to use the pics found on a mission. These can easily be extracted using MapView. ;)

- Zombie

Edited by Zombie, 10 September 2009 - 04:08 PM.
Added link.

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!


#14 hatfarm

hatfarm

    Sound Department

  • Xenocide Sound Department
  • 133 posts

Posted 10 September 2009 - 10:18 PM

My recommendation for the crafts would be to use the pics found on a mission. These can easily be extracted using MapView. ;)


The only problem with that is that the Interceptor and Firestorm won't have pictures then. I was thinking that too otherwise.

Thanks for the help with the file locations, I wasn't sure if they were easily accessible (read already made into .gif or .jpg). I'll have to use BB's utility for that stuff, I've been meaning to check it out anyway. Thanks for your help.

It'll probably be some time next week when I get the first beta version up, because I've got some big time homework and some family stuff. Hopefully it'll be in good shape.

#15 hatfarm

hatfarm

    Sound Department

  • Xenocide Sound Department
  • 133 posts

Posted 13 September 2009 - 11:23 PM

Just a quick update, didn't get to do a whole lot of work this weekend, but I was able to almost completely finish the soldier editor. Just got to finish up editing the stats and then get the "apply to all" function working. Then I'll have the beta here.

QUICK EDIT: Barring any unforeseen problems I should have the beta available tomorrow some time. Now I've just got the "edit all" function to work out, and that shouldn't take too long. I'm also going to do bars that display your stats like in the game, and then I'll be done with the first beta release.

Edited by hatfarm, 14 September 2009 - 11:27 AM.


#16 hatfarm

hatfarm

    Sound Department

  • Xenocide Sound Department
  • 133 posts

Posted 15 September 2009 - 09:14 AM

So, quick question about the craft editor. Should I make it possible to edit the alien crafts as well? Would that be something people would want to do? Let me know, I'm going to proceed with the plan to have that, but if no one's going to use that feature, it's not such a big deal, because it will add time to the development.

#17 kafros

kafros

    Creative Text Department

  • Xenocide Creative-Text Departmen
  • 1,800 posts

Posted 15 September 2009 - 09:35 PM

That sounds interesting (it would facilitate training under specific circumstances, non? ;)), but indeed should be put at the bottom of the stack.

Good job so far hatfarm :D

#18 hatfarm

hatfarm

    Sound Department

  • Xenocide Sound Department
  • 133 posts

Posted 20 September 2009 - 08:47 AM

Question, right now I have limited inputs for soldier stats to 170, should I increase that to 255? Granted, it'll wrap way around, but should I give the user that freedom? Would that be useful to anyone? I'll have to reformat the layout, because the bars would go under the buttons on the right. Any thoughts would be helpful. Thanks.

#19 Zombie

Zombie

    Colonel

  • Xenocide Creative-Text Departmen
  • 2,947 posts

Posted 21 September 2009 - 07:09 AM

Yes, give us the freedom to decide. There are some stats which can be cranked above 170 with no ill effects (my standard testing soldier has 200 TU and 180 Stamina and that combo works great). Other stats don't fair that well when cranked up (strength is one of them) but it still could be useful for testing purposes. :)

- 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!


#20 hatfarm

hatfarm

    Sound Department

  • Xenocide Sound Department
  • 133 posts

Posted 21 September 2009 - 10:55 AM

Yes, give us the freedom to decide.


Yeah, I figured that would be the consensus, so I've already implemented it in my current build. I'll have to rework the bars so they don't stretch so far, but that shouldn't be TOO big of a problem. Thanks for your input.

#21 hatfarm

hatfarm

    Sound Department

  • Xenocide Sound Department
  • 133 posts

Posted 28 September 2009 - 10:08 AM

Just wanted to let everyone know I have been working on it, but it'll probably be the weekend before I can work on it some more. I have 3 tests this week, Wednesday, Thursday and Friday, and I have big homework assignments due in each class as well (funny enough, both programming assignments) so the next iteration is going to be a while. I've got some cool stuff done with the craft editor so far, and the soldier/base editor should be more of what people want.

#22 Zombie

Zombie

    Colonel

  • Xenocide Creative-Text Departmen
  • 2,947 posts

Posted 29 September 2009 - 09:20 PM

No rush on anything Hatfarm. Take your time. I'm looking forward to seeing the next beta though. =b

- 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!


#23 hatfarm

hatfarm

    Sound Department

  • Xenocide Sound Department
  • 133 posts

Posted 03 October 2009 - 09:05 AM

I'm looking forward to seeing the next beta though. =b


Unless I run into some terrible snags or anything, I should be able to crank it out this weekend. It could possibly be Monday or Tuesday if something prevents me from working on it tonight or tomorrow, but the craft editor is getting pretty close to being done.

#24 hatfarm

hatfarm

    Sound Department

  • Xenocide Sound Department
  • 133 posts

Posted 22 October 2009 - 12:19 PM

For anyone who's following the progression of this project, just wanted to let you know why the latest version is taking a bit longer. First, I was going to be loading the images from the actual files from the game so if anyone has done any editing of them, it'll look like t hey look in the game. However, the pictures come out very dark and dull looking. I'm working on some way to make them look better that doesn't burn them out, this is taking me a while to find. Also, school has been kicking my butt, I'm an electrical engineering student and between projects and tests what seems every week, I've only been able to sneak in a couple of hours for XCOMHACK in the last couple weeks. Thirdly, I installed windows 7 about a week ago and have been slowly getting everything migrated back to this computer. I'm currently copying the code off of my desktop/server and will begin probably doing a bit of work on it tonight. Just wanted to let everyone know that I'm getting slowed down, but I'm not stopping. It'll obviously take me a while, but I want to get some specific things available in it, so it'll be a bit better to use.

#25 uncy

uncy

    Sergeant

  • Forum Members
  • PipPipPip
  • 88 posts

Posted 24 October 2009 - 11:24 AM

Hey Hatfarm! I had no idea you where making a new editor! I used to play around with your last one and I loved it...

Since you are asking here a few wishes :D

- Editing x-com units armors, damage modifiers and turret wpns.
- Edit purchase/sell prices of all products.
- Edit Crafts and Craft wpns stats.
- Apply changes to "race" (with %) instead of single Alien... it took a long time to change each "Sectoid Soldier" then "Sectoid Leader" and so on...
- Automatic selling prices according to production costs...
- Change the RESEARCH Tree! I have been dreaming about this... So technologies can be researched with live aliens

Just that for now... Merry christmas Santa! :D
---------------------------------------------------
Uncy

#26 hatfarm

hatfarm

    Sound Department

  • Xenocide Sound Department
  • 133 posts

Posted 24 October 2009 - 10:48 PM

Hey Hatfarm! I had no idea you where making a new editor! I used to play around with your last one and I loved it...

Since you are asking here a few wishes :D

- Editing x-com units armors, damage modifiers and turret wpns.
- Edit purchase/sell prices of all products.
- Edit Crafts and Craft wpns stats.
- Apply changes to "race" (with %) instead of single Alien... it took a long time to change each "Sectoid Soldier" then "Sectoid Leader" and so on...
- Automatic selling prices according to production costs...
- Change the RESEARCH Tree! I have been dreaming about this... So technologies can be researched with live aliens

Just that for now... Merry christmas Santa! :D


All of these are on my list of eventual things to do (for the most part). The research tree changing is probably not going to be doable, unless I can figure out where things are called in the executable and stuff (probably not). All that other stuff I do want to do, and shouldn't have a big problem with, but will finish after the saved game editor part is done. Thanks for the interest. :)

#27 uncy

uncy

    Sergeant

  • Forum Members
  • PipPipPip
  • 88 posts

Posted 25 October 2009 - 03:16 AM

Hey Hatfarm! I had no idea you where making a new editor! I used to play around with your last one and I loved it...

Since you are asking here a few wishes :D

- Editing x-com units armors, damage modifiers and turret wpns.
- Edit purchase/sell prices of all products.
- Edit Crafts and Craft wpns stats.
- Apply changes to "race" (with %) instead of single Alien... it took a long time to change each "Sectoid Soldier" then "Sectoid Leader" and so on...
- Automatic selling prices according to production costs...
- Change the RESEARCH Tree! I have been dreaming about this... So technologies can be researched with live aliens

Just that for now... Merry christmas Santa! :D


All of these are on my list of eventual things to do (for the most part). The research tree changing is probably not going to be doable, unless I can figure out where things are called in the executable and stuff (probably not). All that other stuff I do want to do, and shouldn't have a big problem with, but will finish after the saved game editor part is done. Thanks for the interest. :)



My pleasure!

I want to ask you something, I know you can help me :P

I am making an expansion for X-Com (in VB), and I am trying to make a function that allows you to build bases just like in X-Com. No problems so far... I cannot find/create a good formula that will "check" if the base is properly connected to the rest and, more tediously, another formula that "checks" if the base will not break a vital connection when dismanteling it...

I think you had dealt with this issue since you made a "Base Editor"... I am not sure if you have a formula to check this 2 conditions, perhaps you can make one easily ;)

Thanks in advance! ;)
---------------------------------------------------
Uncy

#28 Zombie

Zombie

    Colonel

  • Xenocide Creative-Text Departmen
  • 2,947 posts

Posted 25 October 2009 - 06:42 AM

I am making an expansion for X-Com (in VB), and I am trying to make a function that allows you to build bases just like in X-Com. No problems so far... I cannot find/create a good formula that will "check" if the base is properly connected to the rest and, more tediously, another formula that "checks" if the base will not break a vital connection when dismanteling it...

I think you had dealt with this issue since you made a "Base Editor"... I am not sure if you have a formula to check this 2 conditions, perhaps you can make one easily ;)

Hatfarm's base editor wasn't that advanced. It allowed you to add and remove modules but didn't check if those operations were "legal" like in the game. ;)

- 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!


#29 hatfarm

hatfarm

    Sound Department

  • Xenocide Sound Department
  • 133 posts

Posted 25 October 2009 - 07:45 AM

Hatfarm's base editor wasn't that advanced. It allowed you to add and remove modules but didn't check if those operations were "legal" like in the game. ;)

- Zombie


No, I thought about doing that but in the end I wanted to let the user make that choice. I may put up a warning or something like that if they do make something not connected to anything else.

However, uncy, I do have an idea of how you would go about doing it. Basically, create an [x,y] array (in XCOM it would be [6,6]) of boolean variables for each base, then whenever something is built, put a 1 at that location in the array. (example: if they build a facility in the top right corner, that would be [5,0]). Then when they're building/dismantling a facility, just check up, down, left and right ones. However, you have to keep in mind sometimes those directions don't exist. If they were to build the top right one, check the one to the left and the one below because those are the only ones that would actually exist, if there is a one in those locations in the array, then building is okay, otherwise tell them they have to have an attached facility. To determine if dismantling will disable other ones pieces, you'd do something similar, only you would move to the left, right, up and down, but check each of their up, downs, lefts and rights (but don't check the facility they're dismantling obviously) to see if they all have connecting facilities. If one of them is only connected to the facility they are dismantling then let them know.

#30 uncy

uncy

    Sergeant

  • Forum Members
  • PipPipPip
  • 88 posts

Posted 25 October 2009 - 07:55 AM

Hatfarm's base editor wasn't that advanced. It allowed you to add and remove modules but didn't check if those operations were "legal" like in the game. ;)

- Zombie


No, I thought about doing that but in the end I wanted to let the user make that choice. I may put up a warning or something like that if they do make something not connected to anything else.

However, uncy, I do have an idea of how you would go about doing it. Basically, create an [x,y] array (in XCOM it would be [6,6]) of boolean variables for each base, then whenever something is built, put a 1 at that location in the array. (example: if they build a facility in the top right corner, that would be [5,0]). Then when they're building/dismantling a facility, just check up, down, left and right ones. However, you have to keep in mind sometimes those directions don't exist. If they were to build the top right one, check the one to the left and the one below because those are the only ones that would actually exist, if there is a one in those locations in the array, then building is okay, otherwise tell them they have to have an attached facility. To determine if dismantling will disable other ones pieces, you'd do something similar, only you would move to the left, right, up and down, but check each of their up, downs, lefts and rights (but don't check the facility they're dismantling obviously) to see if they all have connecting facilities. If one of them is only connected to the facility they are dismantling then let them know.


Yes. That is exactly what I did... But I cannot make the function "detect" a vital connection when there are 2 groups of buildings separated only with one connection. I thought about making the function track all building all the way up to the main "lift"... It's crazy headache for me.

Thanks Hatfarm.

Zombie, please be my game tester ;) I got something new...

cheers
---------------------------------------------------
Uncy

#31 hatfarm

hatfarm

    Sound Department

  • Xenocide Sound Department
  • 133 posts

Posted 25 October 2009 - 08:04 AM

Yes. That is exactly what I did... But I cannot make the function "detect" a vital connection when there are 2 groups of buildings separated only with one connection. I thought about making the function track all building all the way up to the main "lift"... It's crazy headache for me.

Thanks Hatfarm.

Zombie, please be my game tester ;) I got something new...

cheers

Okay, so the way I would do it then would be, keep that array, but have each facility have it's own value (like XCOM has 0 for the lift). Do the search on facilities around it, but continue to search the facilities around that one and so on, until you find a lift connected to one of them. If you never find the lift, then you know it's not connected. This is probably a problem that could be solved elegantly with recursion.

#32 uncy

uncy

    Sergeant

  • Forum Members
  • PipPipPip
  • 88 posts

Posted 25 October 2009 - 08:55 AM

Yes. That is exactly what I did... But I cannot make the function "detect" a vital connection when there are 2 groups of buildings separated only with one connection. I thought about making the function track all building all the way up to the main "lift"... It's crazy headache for me.

Thanks Hatfarm.

Zombie, please be my game tester ;) I got something new...

cheers

Okay, so the way I would do it then would be, keep that array, but have each facility have it's own value (like XCOM has 0 for the lift). Do the search on facilities around it, but continue to search the facilities around that one and so on, until you find a lift connected to one of them. If you never find the lift, then you know it's not connected. This is probably a problem that could be solved elegantly with recursion.


Hehe, true... I will do that ;) seems like a lot of conditions inside conditions and inside conditions... Thanks Hatfarm, I ll let you know how it went.
---------------------------------------------------
Uncy

#33 Catnub

Catnub

    Sergeant

  • Forum Members
  • PipPipPip
  • 12 posts

Posted 01 November 2009 - 05:23 PM

How about something like this (bear with my clumsy phrasing):
if building is connected to lift then 0 else 1
if building is connected to building with value 0 then 0 else 1
if player requests building removal:
- remove building (for sake of the above calculations)
- if sum of buildings is 0 then okay else not okay
Please check out my TFTD Ironman video campaign here, I'm grateful for any comments!

#34 uncy

uncy

    Sergeant

  • Forum Members
  • PipPipPip
  • 88 posts

Posted 02 November 2009 - 05:11 PM

How about something like this (bear with my clumsy phrasing):
if building is connected to lift then 0 else 1
if building is connected to building with value 0 then 0 else 1
if player requests building removal:
- remove building (for sake of the above calculations)
- if sum of buildings is 0 then okay else not okay

Yes, i did something like that. But for now I can't find the "group" of buildings that is missing the lift... I get frustrated with this functions :S
---------------------------------------------------
Uncy

#35 Catnub

Catnub

    Sergeant

  • Forum Members
  • PipPipPip
  • 12 posts

Posted 05 November 2009 - 01:25 PM

Well, wouldn't they show up with a value of 1 rather than 0 according to the above?
Please check out my TFTD Ironman video campaign here, I'm grateful for any comments!

#36 uncy

uncy

    Sergeant

  • Forum Members
  • PipPipPip
  • 88 posts

Posted 05 November 2009 - 02:54 PM

Well, wouldn't they show up with a value of 1 rather than 0 according to the above?

Yes, but the problem is that 1 buiding can take 4 directions each time to find the lift... and each 4 can be connected somehow... All I get with this formula is a paradox... functions inside functions... I am not a programmer, so imagine the pain :D
---------------------------------------------------
Uncy

#37 hatfarm

hatfarm

    Sound Department

  • Xenocide Sound Department
  • 133 posts

Posted 05 November 2009 - 03:09 PM

Hmm... so, the reason the next version is taking so long is because now I'm loading all the resources from the files that come from the game. However, getting it to load properly is a problem. If I don't multithread it, it looks like it locks up until it finishes loading everything. If I do multithread it, it doesn't work. So, I'm still working on it, but I'm somewhat stumped right now. If it persists much longer, I'll just abandon that functionality and go back, but I didn't want to get too far without that functionality, because I would be doing some work just to go back on it. So yeah, just a heads up.

#38 uncy

uncy

    Sergeant

  • Forum Members
  • PipPipPip
  • 88 posts

Posted 05 November 2009 - 03:22 PM

Sorry, but what do you mean by multithread?
---------------------------------------------------
Uncy

#39 hatfarm

hatfarm

    Sound Department

  • Xenocide Sound Department
  • 133 posts

Posted 05 November 2009 - 04:04 PM

Sorry, but what do you mean by multithread?


Basically you have the processor do two different things at a time. It helps you to not get "lockups" during run time because the user is able to do other things while a thread is running. However, you have to tie the two threads together at some point and that's where I'm having trouble.

#40 uncy

uncy

    Sergeant

  • Forum Members
  • PipPipPip
  • 88 posts

Posted 05 November 2009 - 04:29 PM

Sorry, but what do you mean by multithread?


Basically you have the processor do two different things at a time. It helps you to not get "lockups" during run time because the user is able to do other things while a thread is running. However, you have to tie the two threads together at some point and that's where I'm having trouble.


Oh. I see. Do you mean using the "DoEvent" procedure? I use it when drawing in picboxes in infinite loops... I still can't figure why you would need to multithread in a editor :S
---------------------------------------------------
Uncy

#41 hatfarm

hatfarm

    Sound Department

  • Xenocide Sound Department
  • 133 posts

Posted 05 November 2009 - 05:39 PM

Oh. I see. Do you mean using the "DoEvent" procedure? I use it when drawing in picboxes in infinite loops... I still can't figure why you would need to multithread in a editor :S


Because of the length of time it takes to load all of the resources (also crop and increase the size), I chose to try loading them in another thread, but haven't been able to get it to work properly yet.

#42 Gurluas2000

Gurluas2000

    Captain

  • Forum Members
  • PipPipPipPip
  • 151 posts

Posted 21 November 2009 - 05:38 PM

Allow the ability to use the "alien armor"
(all armor from value 0 up to Value 14 i think)

Edited by Gurluas2000, 21 November 2009 - 05:38 PM.


#43 hatfarm

hatfarm

    Sound Department

  • Xenocide Sound Department
  • 133 posts

Posted 24 November 2009 - 10:58 AM

I just wanted to give an update. I'm still planning on working on it but I've been super busy so I haven't gotten to working on it. It'll probably be a couple weeks before I can actually get to finishing this thing up because I've got pretty much tests, projects (designing a microwave timer) and finals. I am still working at it in my head.

#44 hatfarm

hatfarm

    Sound Department

  • Xenocide Sound Department
  • 133 posts

Posted 18 December 2009 - 12:21 PM

Work has resumed. I'm not going to keep loading the resources for right now. It either doesn't work right, or it takes too long, and I feel like it would be better to finish the work and get out a fully featured program, then go back and add that. If all goes according to plan, I'll have the next beta out this weekend.

#45 hatfarm

hatfarm

    Sound Department

  • Xenocide Sound Department
  • 133 posts

Posted 18 December 2009 - 12:34 PM

Allow the ability to use the "alien armor"
(all armor from value 0 up to Value 14 i think)


I just tried this, the problem is that when you try to start a new mission, the game crashes because it can't load the image for this. This may just be the CE version, but I don't want to create that problem for people.

#46 Gurluas2000

Gurluas2000

    Captain

  • Forum Members
  • PipPipPipPip
  • 151 posts

Posted 19 December 2009 - 09:33 PM

Allow the ability to use the "alien armor"
(all armor from value 0 up to Value 14 i think)


I just tried this, the problem is that when you try to start a new mission, the game crashes because it can't load the image for this. This may just be the CE version, but I don't want to create that problem for people.


I fixed that by copying some of the image files and renaming them, i released it here earlier btw naming it alien pack or something,
It is really awesome to be able to play as an alien, the only bad thing is that you need to be able to hex edit as most editors only allows you to set the offset to 3, so it would be useful if an editor like yours could have that function.

#47 hatfarm

hatfarm

    Sound Department

  • Xenocide Sound Department
  • 133 posts

Posted 20 December 2009 - 12:27 AM

I fixed that by copying some of the image files and renaming them, i released it here earlier btw naming it alien pack or something,
It is really awesome to be able to play as an alien, the only bad thing is that you need to be able to hex edit as most editors only allows you to set the offset to 3, so it would be useful if an editor like yours could have that function.


Yeah, I may add that functionality later, but right now I'm going to focus on the things that don't require creating new files and such. I wanna do the "easy" stuff first. :)

#48 Gurluas2000

Gurluas2000

    Captain

  • Forum Members
  • PipPipPipPip
  • 151 posts

Posted 29 December 2009 - 11:16 AM

I have attached the packs here so you can take a look at them (:

Pack3 is for TftdAttached File  pack3.rar   203.24K   112 downloads
Pack is for UfoAttached File  pack.rar   27.93K   113 downloads

Edited by Gurluas2000, 29 December 2009 - 11:17 AM.


#49 xcomufo1234

xcomufo1234

    Squaddie

  • Forum Members
  • PipPip
  • 1 posts

Posted 09 January 2010 - 11:48 AM

Work has resumed. I'm not going to keep loading the resources for right now. It either doesn't work right, or it takes too long, and I feel like it would be better to finish the work and get out a fully featured program, then go back and add that. If all goes according to plan, I'll have the next beta out this weekend.


Is the beta out somewhere? I may have missed in on your site...

Never mind...found it.

Edited by xcomufo1234, 09 January 2010 - 11:51 AM.


#50 NFSlugger13

NFSlugger13

    Squaddie

  • Forum Members
  • PipPip
  • 3 posts

Posted 12 January 2010 - 06:52 PM

So, quick question about the craft editor. Should I make it possible to edit the alien crafts as well? Would that be something people would want to do? Let me know, I'm going to proceed with the plan to have that, but if no one's going to use that feature, it's not such a big deal, because it will add time to the development.


First of all, thanks for all of your hard work on this project! There are many of us (quiet ones, mostly) who are still looking for an all-in-one editor to take care of the majority of their modding needs. Being a guy who has limited programming knowledge and capability, your plan sounds perfect. I look forward to seeing what you are going to do in the end.

As for the craft editor, it would be nice to design fresh new alien ships, but I don't think it's a necessity. I'd rather have that on the back burner, but I'd use it if you added it to a later edition.

Now, some ideas (since you did ask for them):

1.) Easy-to-modify stats for alien units according to difficulty level. Say, each higher diff. level adds 5% to stats (adjustable)

2.) Adding more weapons (is it even possible?)

3.) Easy-to-change weapon stats

4.) Change vulnerabilities of aliens to damage types

5.) Make smoke grenades more useful (incendiary?)

6.) Melee weapons? I know TFTD has them, so I'm guessing it's possible.

7.) Change base statistics for default soldiers (i.e. higher base health/TUs, 20 front armor instead of 12)

8.) Alter terrain durability (higher health values for walls, etc.)

***
9.) This is the one most dear to me: the ability to modify/import .PCK files with minimal headaches. I've tried a couple of programs and made some sweet PCKs, but they always wind up looking garbled or misaligned in-game. I've looked all over for clear instructions on how to do this, but keep screwing up. I know this is not at all related to exe or savegame editing, but if anyone here knows a foolproof way of doing PCK editing I'd be (along with my friends) forever grateful.

I can't wait to see what you come up with. Thanks again for your efforts.