Multiple hardpoints for heavy body?

Discuss the future of Warzone 2100 with us.
Post Reply
User avatar
Watermelon
Code contributor
Code contributor
Posts: 551
Joined: 08 Oct 2006, 09:37

Multiple hardpoints for heavy body?

Post by Watermelon » 09 Oct 2006, 14:34

Personally I think heavy bodies are a bit underpowered in wz2100,they cost a lot more than medium and light bodies,but have the same amount of damage output as light and medium bodies,the only advantage of heavy body is 'tanking',which doesnt worth the extra costs and speed penalty due to the extra weight.So I think heavy body should have multiple hardpoints that can be equipped with weapons(weapon only,since it can be problematic in AI if a tank has both 'utility' and 'weapon'),things need to be changed for this feature in my opinion:

multi-target AI state(optional,all weapons can shoot at 1 target)
tank structure change: so that it can store multiple weapons info:reload time,salvo etc
tank structure change: a special flag that tells whether this tank has multiple weapons or not
tank model change(placement change,just make sure the multiple turrents models are not overlapped each other)
design template change,separate IDES_TURRET into few TURRENTs
design interface change,add additional weapon buttons to design-select weapon tab
design validity change,2nd,3rd,4th etc weapons are required to finish the design.
design interface change,add 'complete' button to design-select weapon tab after the primary weapon is selected,which 'signal' validity check to skip 2nd,3rd,4th etc weapon prerequisite check.
some changes in combat.c
some changes in component.c
enable AI to design and use them


Please correct me if I am wrong,I want to give a try to implement such a feature as an opportunity to fix my broken C/C++,though implementing multiple hardpoints might be much more complex than I thought  :D
tasks postponed until the trunk is relatively stable again.

User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: Multiple hardpoints for heavy body?

Post by DevUrandom » 09 Oct 2006, 18:06

Sounds interesting, but quite hard I guess.
I'd do all those AI stuff at the very last, though.
This change probably requires changes to the renderer and the GUI as well as the game mechanics themselves, so it could be more complex than you though.
But feel free to investigate.
For 2.1 the plan is to replace the GUI engine with something more easily modable, so if you have ideas for that...

User avatar
Watermelon
Code contributor
Code contributor
Posts: 551
Joined: 08 Oct 2006, 09:37

Re: Multiple hardpoints for heavy body?

Post by Watermelon » 09 Oct 2006, 18:43

DevUrandom wrote: Sounds interesting, but quite hard I guess.
I'd do all those AI stuff at the very last, though.
This change probably requires changes to the renderer and the GUI as well as the game mechanics themselves, so it could be more complex than you though.
But feel free to investigate.
For 2.1 the plan is to replace the GUI engine with something more easily modable, so if you have ideas for that...
Thanks,I'll try to mess with the source a bit.
The TODO file mentioned something about script-able GUI using lua,think that is flexible enough to handle potential custom GUIs used in mods.
tasks postponed until the trunk is relatively stable again.

Troman
Trained
Trained
Posts: 424
Joined: 12 Aug 2006, 15:40
Contact:

Re: Multiple hardpoints for heavy body?

Post by Troman » 09 Oct 2006, 19:24

I think WZ is almost capable of handling more than 1 weapon, looks like Pumpkin guys simply had not enough time to implement it. Anyway, pie files already support multiple weapons as far as I remember and some other routines as well.

Unit AI, Design Window, assignweapons.txt, are there any other bigger parts that would need modification that i'm missing? I think the only modification renderer will need is to go through all weapons a unit has and that's about it, or am I wrong?

I hope no modification is required for the net code, scripting is also almost not affected.

And as I can see it the only GUI modification that is required are some additional weapon buttons for the design screen. If so, I can probably take over this part.
Sign Up for Beta-Testing:
?topic=1617.0

User avatar
Watermelon
Code contributor
Code contributor
Posts: 551
Joined: 08 Oct 2006, 09:37

Re: Multiple hardpoints for heavy body?

Post by Watermelon » 09 Oct 2006, 20:48

Yes looks like the multiple weapon support is semi-completed in the source.Think the hardest part will be weapon_stat and AI,currently most functions in the source uses asWeap[0] rather than looping through asWeap[DROID_MAXWEAPS] array.AI part is even harder:turret rotation,targeting and special versions of most functions in actions.c are required for multi-turrents rotation,targeting.
tasks postponed until the trunk is relatively stable again.

User avatar
Terminator
Regular
Regular
Posts: 1074
Joined: 05 Aug 2006, 13:46
Location: Ukraine
Contact:

Re: Multiple hardpoints for heavy body?

Post by Terminator » 09 Oct 2006, 22:04

for developers > !

as for me (I think) you must concentrate on a wz engine( Graphic) or netcode.

Too bad that I dont know c++. But as for player I want to see a new & stabile netplay;). I think netcode must be done at first. But you are the Boss.  :-X

& that tricks with game econometric must be in the end of the "Long List" ::) Its what I think about wz development. Sorry. :-[

thanks.

"Minority report" 8)
Death is the only way out... sh*t Happens !

Russian-speaking Social network Group http://vk.com/warzone2100

User avatar
Speeder
Trained
Trained
Posts: 38
Joined: 09 Aug 2006, 18:57
Contact:

Re: Multiple hardpoints for heavy body?

Post by Speeder » 09 Oct 2006, 23:56

i think as terminator, for developters the first what they must update or do more good that now thise is netplay, second is graphic optimisation and new models, third - give more brain to  A.I. , and only then the balanse and the parametrs of units... IMHO ;)

i know c++ not so much, my usualy languge is visual bsic.net and php, but we have people who want to take part in development of warzone 2100 2.0.X may be we can cooperate?

User avatar
Watermelon
Code contributor
Code contributor
Posts: 551
Joined: 08 Oct 2006, 09:37

Re: Multiple hardpoints for heavy body?

Post by Watermelon » 10 Oct 2006, 01:22

Unfortunately I cant help with render engine or netcode
part of the source,because I am novice at C/C++
programming.

Anyway,here is the modified source files I have been messing around:
1.added a UDWORD or int called 'hydra'(multiple-turret) to Droid struct and Droid_template struct in droid.c/droiddef.h
2.re-enabled a few checks for multiple-turret asWeaps[] in ai.c,action.c,rewrote the missing ones.
3.added #define 'unique button Id' for TURRENT_A=5028,TURRENT_B=5029 in design.h.
4.added IDES_TURRENT_A=6,IDES_TURRENT_B=7 to enum _des_compmode and switch case for those 2 new enum in design.c.
5.changed DROID_MAXWEAPS to 3
6.changed combfire functions used in action.c first parameter to reference,because the resized asWeaps[] doesnt work anymore as a regular variable in combfire.(Think this 'hack' crashes game when initializing the game)

I left comments started with 'Watermelon:' in all functions/variables I
touched,hope you wont mind attaching source files as
attachments here.
Attachments
src.zip
(124.12 KiB) Downloaded 409 times
tasks postponed until the trunk is relatively stable again.

User avatar
C01eMaN
Trained
Trained
Posts: 58
Joined: 11 Aug 2006, 07:17
Location: UK
Contact:

Re: Multiple hardpoints for heavy body?

Post by C01eMaN » 10 Oct 2006, 09:12

wow this looks really good...
id love to see this on the dragon body then i might actually bother to use it lol...

if u need a beta tester u know where to look  8)

--
p.s.
i think this topic should be moved to development
Last edited by C01eMaN on 10 Oct 2006, 09:30, edited 1 time in total.
Im Addicted To Warzone!!!!!!!

User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: Multiple hardpoints for heavy body?

Post by DevUrandom » 10 Oct 2006, 12:30

To those mourning about what the devs should do in their HO:
We do this for fun, so we do what we like to do. We don't get paid and thus don't take orders. ;)
If we work on your bugreports you should see this as a gift. (Esp. for the exotic ones.)
We know that there are problems with the netcode and other parts of the engine and we are thinking about how that can be improved. You may see the results in 2.1 or 2.2.
And if someone is volunteering to do something he likes to do with Warzone, please don't tell him he should do something else. Every contribution is worth to be respected!

Watermelon: I'll look at this later, perhaps tomorrow. Have currently no time at all... (sry)

User avatar
Watermelon
Code contributor
Code contributor
Posts: 551
Joined: 08 Oct 2006, 09:37

Re: Multiple hardpoints for heavy body?

Post by Watermelon » 10 Oct 2006, 14:09

No problem,take your time.

I think I did something wrong when modifying the source files,it did compile successfully,but it crashes as soon as you start a game(sp campaign and mp game,loading is nearly completed),the last few lines of stderr:

main:      stageThreeInitalise
wz:        multiGameInit()
never:      gridClear 12 12
never:      driveInitVars: Driving
wz:        Creating teams
main:      Entering main loop


The only thing I can tell is it didnt shutdown gracefully,because neither 'debug(LOG_MAIN, "Shuting down application");' nor 'debug(LOG_ERROR, "Shutting down after failure");' was printed out to stderr before the crash.
tasks postponed until the trunk is relatively stable again.

User avatar
Watermelon
Code contributor
Code contributor
Posts: 551
Joined: 08 Oct 2006, 09:37

Re: Multiple hardpoints for heavy body?

Post by Watermelon » 11 Oct 2006, 08:42

I have fixed the crash problem in modified source,it's in function 'void statsInitVars(void)' in line 187 in stats.c,where I put a wrong value '2' for 'numWeaponStats',apparently '2' is not what the code expects,I changed it back to '0' from '2',now the game runs without crashing at the end of loading.

I'll try to make ai targeting,visibility check,targetInRange and other ai and action related functions to accept more than one weapons,I need some help with design.c though,I am really confused by these button types and button x,y coords etc.

Thanks.
tasks postponed until the trunk is relatively stable again.

User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: Multiple hardpoints for heavy body?

Post by DevUrandom » 11 Oct 2006, 10:57

I just had a quick look and saw that you provided the complete sourcefiles.
Could you instead please give a patch? That is much easier for me to read and find out what you changed.
On Windows you can create a patch with TortoiseSVN. Open the Warzone SVN folder, R-click into it and choose TortoiseSVN -> Create Patch [at the bottom of the list]. Save that as "somename.patch" and post it here. It will probably be much smaller than the complete files, because it only includes the changes.

User avatar
Watermelon
Code contributor
Code contributor
Posts: 551
Joined: 08 Oct 2006, 09:37

Re: Multiple hardpoints for heavy body?

Post by Watermelon » 11 Oct 2006, 11:38

Here is the patch created with TortoiseSVN(contains cybersphinx's gamma patch) :)

edit:added wzpatch2.patch attachments.Made more changes to ai.c,action.c,droid.c,but also made a new crash problem at the beginning of game.
Attachments

[The extension has been deactivated and can no longer be displayed.]

[The extension has been deactivated and can no longer be displayed.]

Last edited by Watermelon on 12 Oct 2006, 10:21, edited 1 time in total.
tasks postponed until the trunk is relatively stable again.

User avatar
Watermelon
Code contributor
Code contributor
Posts: 551
Joined: 08 Oct 2006, 09:37

Re: Multiple hardpoints for heavy body?

Post by Watermelon » 14 Oct 2006, 11:53

I have run into more problems than I expected when modifying the source,there is only 1 copy of turrent info TurrentRotate etc in droid struct.Also I am trying to find what is causing the crashes in modified source,but unlike linux,in windows it doesnt give any info except strerr output upon crash,I still unable to compile the source with MSVC,so I couldnt use the VC debugger to pinpoint the problem.Mingw 'commandline debugger' GDB seems to be too hard for me :D

Any tips/tricks to get useful info in windows upon crash will be appreciated. :)
tasks postponed until the trunk is relatively stable again.

Post Reply