UFO:Alien Invasion

Development => Newbie Coding => Topic started by: DarkRain on August 07, 2010, 10:45:01 pm

Title: Alien Resistance
Post by: DarkRain on August 07, 2010, 10:45:01 pm
So I was thinking about adding resistance/weakness to the aliens in my game, (at least until it is oficially implemented) so I made some changes in the code (see attachment), now the question is: Wich is the best way to make sure it´s doing what it´s supposed to? The values I used are probably too low to see any conclusive result in game (need to work on that) and I´m not getting any thing from the console log (I compiled a debug version and used +set developer 1) so any ideas? (Or maybe you can test it for me?)

(Note that I haven´t coded anything that requires compiling in several years)
Title: Re: Alien Resistance
Post by: geever on August 08, 2010, 02:14:34 am
So I was thinking about adding resistance/weakness to the aliens in my game, (at least until it is oficially implemented) so I made some changes in the code (see attachment), now the question is: Wich is the best way to make sure it´s doing what it´s supposed to? The values I used are probably too low to see any conclusive result in game (need to work on that) and I´m not getting any thing from the console log (I compiled a debug version and used +set developer 1) so any ideas? (Or maybe you can test it for me?)

(Note that I haven´t coded anything that requires compiling in several years)

you could add this to the Patch Tracker (https://sourceforge.net/tracker/?group_id=157793), so it doesn't get lost.

-geever
Title: Re: Alien Resistance
Post by: DarkRain on August 08, 2010, 07:37:10 pm
Ok, managed to test it successfully (tough only used skirmish mode for now), tried some balancing but still needs more testing.
Added it to the patch tracker:
https://sourceforge.net/tracker/?func=detail&aid=3041597&group_id=157793&atid=805244 (https://sourceforge.net/tracker/?func=detail&aid=3041597&group_id=157793&atid=805244)

I must admit that since I haven't touched C since I was at school I didn't expect this to be even considered to be included in the project
Title: Re: Alien Resistance
Post by: Mattn on August 08, 2010, 07:48:52 pm
i've added a comment to the tracker - in general the data should go into the scripts, the structures that hold the data should go into csi_t
Title: Re: Alien Resistance
Post by: DarkRain on August 08, 2010, 08:25:33 pm
in general the data should go into the scripts

That is what I think as well, now the question would be: Add a new script or integrate it with an existing one (maybe the armor team definition script?)? I was also thinking that this is related to the character creation templates (at least they seem related to me) but that's another matter. Unfortunately I don't expect to have a lot of time and my coding is very rusty but will see what can be done
Title: Re: Alien Resistance
Post by: Mattn on August 08, 2010, 11:04:48 pm
yes, adding it into team_* would be the best imo.
Title: Re: Alien Resistance
Post by: DarkRain on August 09, 2010, 01:40:45 am
Ok patch has been updated(I'm attaching it here as well), resistance/weakness should now be scriptable in the team_* scripts, it might need balancing tough, but it should be easier to do it now.
Title: Re: Alien Resistance
Post by: Mattn on August 09, 2010, 10:04:12 am
applied to trunk https://sourceforge.net/apps/trac/ufoai/changeset/31313
Title: Re: Alien Resistance
Post by: Thrashard96 on August 09, 2010, 10:23:24 am
What about the rf fix? You should work on that.
Title: Re: Alien Resistance
Post by: DarkRain on August 09, 2010, 05:39:56 pm
applied to trunk https://sourceforge.net/apps/trac/ufoai/changeset/31313
I see most things I left over (had plans for Sunday afternoon so I didn't completely finish it) were corrected, but seems we both overlooked extending the description in team_humans.ufo to account for the new options - just a tiny detail

What about the rf fix? You should work on that.
I was thinking to go back to translating now (that i might have some time), but if you point me in the right direction I might take a look
Title: Re: Alien Resistance
Post by: Thrashard96 on August 10, 2010, 09:19:21 am
From ufo folder: \src\game\g_reaction.c
Title: Re: Alien Resistance
Post by: DarkRain on August 11, 2010, 04:44:48 am
From ufo folder: \src\game\g_reaction.c
Hehe, I could have found it myself, I meant point me to what needs fixing, what is missing or lacking or new features to be implemented

There is a bug fix posted Here (http://ufoai.ninex.info/forum/index.php?topic=5000.msg40986#msg40986)
It's in the tracker here: 3027802 (http://sourceforge.net/tracker/?func=detail&aid=3027802&group_id=157793&atid=805244)
So I guess you have something different in mind?