Mod Question Repository... Questions come in, answers go out - Page 38

Mod Question Repository... Questions come in, answers go out

Resources to get you going on your new project, or to help you over some emergent problems during your development cycle.

Moderator: Moderators

Locked
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Mod Question Repository... Questions come in, answers go out

Post by CarRepairer »

Question regarding endgame stats damage dealt:

1) Does it calculate all damage done or only that done to enemies?

2) Does it include paralyzer damage?

3) Does it calculate the damage done by the weapon or is there a cap on the unit's max HP? For example when you dgun a flea does it count as 20 damage or 99999? (This has to be taken into account in lua's unitdamaged as it results in the 99999.)

The reason I'm asking is I want to write an accurate description for why awards in CA/PW don't always match the endgame stats chart.
User avatar
Evil4Zerggin
Posts: 557
Joined: 16 May 2007, 06:34

Re: Mod Question Repository... Questions come in, answers go out

Post by Evil4Zerggin »

Code: Select all

void CUnit::DoDamage(const DamageArray& damages, CUnit *attacker,const float3& impulse, int weaponId)
[...]
	if (paralyzeTime == 0) { // real damage
		if (damage > 0.0f) {
			// Dont log overkill damage (so dguns/nukes etc dont inflate values)
			const float statsdamage = std::max(0.0f, std::min(maxHealth - health, damage));
			if (attacker) {
				gs->Team(attacker->team)->currentStats.damageDealt += statsdamage;
			}
			gs->Team(team)->currentStats.damageReceived += statsdamage;
			health -= damage;
		}
So it looks like all, no, and capped.
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Mod Question Repository... Questions come in, answers go out

Post by CarRepairer »

Thank you sir.
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

Re: Mod Question Repository... Questions come in, answers go out

Post by [Krogoth86] »

Is it possible to define an icon for "unknown" enemy radar dots? And if not is it the "default" radar icon that gets used for this so I'd have to make the default icon the "unknown symbol" and assign specific icons in the units' FBIs?

EDIT:
Ah ok - the default icon is the one which gets used for unknown radar dots. Still it would be more comfortable if there is an entry just for this as otherwise I'd have to edit lots of FBIs... :wink:
User avatar
Pressure Line
Posts: 2283
Joined: 21 May 2007, 02:09

Re: Mod Question Repository... Questions come in, answers go out

Post by Pressure Line »

[Krogoth86] wrote:Is it possible to define an icon for "unknown" enemy radar dots? And if not is it the "default" radar icon that gets used for this so I'd have to make the default icon the "unknown symbol" and assign specific icons in the units' FBIs?

EDIT:
Ah ok - the default icon is the one which gets used for unknown radar dots. Still it would be more comfortable if there is an entry just for this as otherwise I'd have to edit lots of FBIs... :wink:
lazy prick :P

and arent there mass-editing tools for FBI anyway?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Mod Question Repository... Questions come in, answers go out

Post by Argh »

Does anybody know a way to force a mod to use fixed start positions? I have a mini-game I've been wanting to do, and time to do it today, since this is un-planned time... but I was thinking that I needed to do this, to make it work. Any ideas?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Mod Question Repository... Questions come in, answers go out

Post by KDR_11k »

No but I suppose if you want to force fixed the mod is limited to a fixed set of maps too? In that case you could just use Lua to move everyone to the fixed starting position (maybe even base it on proximity if you want people to pick which of the fixed positions they'd like). Pong uses fixed starting rectangles that are enforced with Lua (and also used for determining who's on which team)
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Mod Question Repository... Questions come in, answers go out

Post by Argh »

No but I suppose if you want to force fixed the mod is limited to a fixed set of maps too?
Yeah, for beta 1, I was thinking that would be best, for the particular gameplay I wanted to achieve.

That's ideally, though. It's not quite as limited in scope as Pong. It probably doesn't matter, I think players behaviors will become logical, when they understand the rules.
Sheekel
Posts: 1391
Joined: 19 Apr 2005, 19:23

Re: Mod Question Repository... Questions come in, answers go out

Post by Sheekel »

Question regarding starting a new game from scratch, was there a default mod base created at some point?
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

Re: Mod Question Repository... Questions come in, answers go out

Post by [Krogoth86] »

AFAIK Argh once created sort of an "empty modfile" - I also think I saw that once in one of the early PURE versions included in the file. You might want to ask him about it...
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6241
Joined: 29 Apr 2005, 01:14

Re: Mod Question Repository... Questions come in, answers go out

Post by FLOZi »

Sheekel wrote:Question regarding starting a new game from scratch, was there a default mod base created at some point?
I have one.

Meant to be the absolute minimum for spring to run without any error messages, though it's not 100% uptodate for 77b5
Attachments
MDK_Phase1.sdd.rar
(2.55 KiB) Downloaded 166 times
Sheekel
Posts: 1391
Joined: 19 Apr 2005, 19:23

Re: Mod Question Repository... Questions come in, answers go out

Post by Sheekel »

thanks flozi :-)
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6241
Joined: 29 Apr 2005, 01:14

Re: Mod Question Repository... Questions come in, answers go out

Post by FLOZi »

N.B., it would *run* with certain files not being there, without exiting, but you would get errors in chat.

edit: also note that all the files are in lua format where possible, may as well avoid FBI/TDF if you are starting from nothing. :wink:
Sheekel
Posts: 1391
Joined: 19 Apr 2005, 19:23

Re: Mod Question Repository... Questions come in, answers go out

Post by Sheekel »

if i use luadefs I presume i can change values on the fly?

ingame unit customization is of vital importance to the success of my game
SeanHeron
Engines Of War Developer
Posts: 614
Joined: 09 Jun 2005, 23:39

Re: Mod Question Repository... Questions come in, answers go out

Post by SeanHeron »

Many thanks for that "empty" mod folder! I found it very useful :). And I agree that it's good to have everything in lua if your starting afresh anyway. I was thinking of putting together an "skeleton" like this just for my own use, but you saved me that effort, so I really am grateful :D!
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Mod Question Repository... Questions come in, answers go out

Post by KDR_11k »

Sheekel wrote:if i use luadefs I presume i can change values on the fly?

ingame unit customization is of vital importance to the success of my game
No, luadefs make no difference to the result. You can modify your unitdefs in unitdefs_post.lua (works on fbis too AFAIK) but after that they're read-only. Customization can be done in other ways.
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2702
Joined: 25 Aug 2004, 13:31

Re: Mod Question Repository... Questions come in, answers go out

Post by bobthedinosaur »

is there a way to call a cob explosion to destroy a piece but doesnt have an annoying flash attached to it?
User avatar
Evil4Zerggin
Posts: 557
Joined: 16 May 2007, 06:34

Re: Mod Question Repository... Questions come in, answers go out

Post by Evil4Zerggin »

What exactly do you mean by "destroy"? If you want it to just disappear, you can use hide [piece];. Otherwise you're out of luck as far as COB goes (unless you make the default heatcloud invisible).
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2702
Joined: 25 Aug 2004, 13:31

Re: Mod Question Repository... Questions come in, answers go out

Post by bobthedinosaur »

well i wanted to kill a piece primarily for stopping the weapon but i guess i could just jam it instead
User avatar
Evil4Zerggin
Posts: 557
Joined: 16 May 2007, 06:34

Re: Mod Question Repository... Questions come in, answers go out

Post by Evil4Zerggin »

Hiding/exploding a piece won't stop a weapon. In fact exploding a piece won't even hide it.
Locked

Return to “Game Development Tutorials & Resources”