Anonymous Login
2018-12-16 10:18 UTC

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001765OpenClonkScenariospublic2018-01-28 20:29
Reporterala 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
Product Version 
Target Versiongit masterFixed in Version 
Summary0001765: Acid Drilling: Add NPCs for Information on top of the description
DescriptionThis is from the forum, feedback from Luchs: http://forum.openclonk.org/topic_show.pl?pid=31864#pid31864

These comments are addressing the colored crystals which prevent power transport.

'At some point when trying to get energy into the mine you hit the "no build"-zone near the crystals. There is very little feedback about why you can't build there, it somewhat feels like a bug.

The scenario would benefit a lot from a guide NPC like in some of the other missions. Maybe one near the crystal barrier explaining why you can't build there and another one near the acid lake giving a tip about energy generation with the pump.'



TagsNo tags attached.
Attached Files
  • patch file icon 0001-Suggestion-for-1765-Acid-Drilling-Crystal-lightning.patch (4,557 bytes) 2018-01-24 21:10 -
    From f2cff6a1360380d6279b4f5926d89466f291faf5 Mon Sep 17 00:00:00 2001
    From: Julius Michaelis <gitter@liftm.de>
    Date: Wed, 24 Jan 2018 22:04:47 +0100
    Subject: [PATCH] Suggestion for #1765/Acid Drilling: Crystal lightning
    
    ---
     .../AcidDrilling.ocs/PowerCrystals.ocd/Script.c    | 33 ++++++++++++++--------
     .../System.ocg/NoLightningAttractors.c             | 10 +++++++
     .../AcidDrilling.ocs/System.ocg/PowerLightning.c   | 15 ++++++++++
     .../Cloud.ocd/Lightning.ocd/Script.c               |  4 +--
     4 files changed, 49 insertions(+), 13 deletions(-)
     create mode 100644 planet/Missions.ocf/AcidDrilling.ocs/System.ocg/NoLightningAttractors.c
     create mode 100644 planet/Missions.ocf/AcidDrilling.ocs/System.ocg/PowerLightning.c
    
    diff --git a/planet/Missions.ocf/AcidDrilling.ocs/PowerCrystals.ocd/Script.c b/planet/Missions.ocf/AcidDrilling.ocs/PowerCrystals.ocd/Script.c
    index 63fcdbe8e..f8a726216 100644
    --- a/planet/Missions.ocf/AcidDrilling.ocs/PowerCrystals.ocd/Script.c
    +++ b/planet/Missions.ocf/AcidDrilling.ocs/PowerCrystals.ocd/Script.c
    @@ -1,25 +1,36 @@
     /*-- Power crystal --*/
     
    -#include Library_Flag
    -
    -local DefaultFlagRadius = 250;
    +local EffectRadius = 250;
     
     protected func Initialize()
     {
     	SetCategory(C4D_StaticBack);
     	SetR(Random(360));
     	SetObjectBlitMode(GFX_BLIT_Additive);
    -	SetClrModulation(RGB(127+Random(3)*64,127+Random(3)*64,127+Random(3)*64));
    +	RandomGlow();
    +	ZapBuildings();
     	return _inherited(...);
     }
     
    -local Name = "$Name$";
    -local Description = "$Description$";
    +protected func ZapBuildings()
    +{
    +	for(var b in FindObjects(Find_Distance(EffectRadius), Find_Category(C4D_Structure), Find_Exclude(this)))
    +	{
    +		var d = ObjectDistance(b);
    +		var v = RandomX(EffectRadius * 7 / 10, EffectRadius);
    +		var a = Angle(GetX(), GetY(), b->GetX(), b->GetY()) + RandomX(-30, 30) + RandomX(-20, 20);
    +		LaunchLightning(GetX(), GetY(), 100, Sin(a, v), -Cos(a, v), 15, 15);
    +		// cheat a little bit, so we'll definitely destroy it eventually…
    +		b->DoDamage(1, FX_Call_DmgScript, GetController());
    +		RandomGlow();
    +	}
    +	ScheduleCall(this, "ZapBuildings", Random(40) + 1);
    +}
     
    -global func CheckConstructionSite(structure_id, x,y)
    +private func RandomGlow()
     {
    -	// Construction check: May not construct in power crystal range
    -	if (!inherited(structure_id, x,y, ...)) return false;
    -	if (FindObject(Find_ID(PowerCrystals), Find_Distance(PowerCrystals.DefaultFlagRadius, x,y))) return false;
    -	return true;
    +	SetClrModulation(RGB(127+Random(3)*64,127+Random(3)*64,127+Random(3)*64));
     }
    +
    +local Name = "$Name$";
    +local Description = "$Description$";
    diff --git a/planet/Missions.ocf/AcidDrilling.ocs/System.ocg/NoLightningAttractors.c b/planet/Missions.ocf/AcidDrilling.ocs/System.ocg/NoLightningAttractors.c
    new file mode 100644
    index 000000000..7c6fecae6
    --- /dev/null
    +++ b/planet/Missions.ocf/AcidDrilling.ocs/System.ocg/NoLightningAttractors.c
    @@ -0,0 +1,10 @@
    +#appendto *
    +
    +public func RejectLightningStrike() { return false; }
    +
    +public func Construction()
    +{
    +	var rv = _inherited(...);
    +	this.IsLightningAttractor = nil;
    +	return rv;
    +}
    diff --git a/planet/Missions.ocf/AcidDrilling.ocs/System.ocg/PowerLightning.c b/planet/Missions.ocf/AcidDrilling.ocs/System.ocg/PowerLightning.c
    new file mode 100644
    index 000000000..dde700fd0
    --- /dev/null
    +++ b/planet/Missions.ocf/AcidDrilling.ocs/System.ocg/PowerLightning.c
    @@ -0,0 +1,15 @@
    +#appendto Lightning
    +
    +protected func Construction()
    +{
    +	this.Origin = { x: GetX(), y: GetY() };
    +}
    +
    +// Path is always free, up to a certain distance.
    +private func PathFree2()
    +{
    +	if (Distance(GetX(), GetY(), this.Origin.x, this.Origin.y) < 300)
    +		return false; // Means free. ¯_¯
    +	else
    +		return _inherited(...);
    +}
    diff --git a/planet/Objects.ocd/Environment.ocd/Cloud.ocd/Lightning.ocd/Script.c b/planet/Objects.ocd/Environment.ocd/Cloud.ocd/Lightning.ocd/Script.c
    index 5e979b289..589ceb354 100644
    --- a/planet/Objects.ocd/Environment.ocd/Cloud.ocd/Lightning.ocd/Script.c
    +++ b/planet/Objects.ocd/Environment.ocd/Cloud.ocd/Lightning.ocd/Script.c
    @@ -151,7 +151,7 @@ private func DrawLightningLine(int x1, int y1, int x2, int y2, int distance, int
     		G = 0,
     		B = 240,
     		Alpha = PV_Linear(128, 0),
    -		Size = size,
    +		Size = 2 * size,
     		Rotation = angle,
     		BlitMode = GFX_BLIT_Additive
     	};
    @@ -161,7 +161,7 @@ private func DrawLightningLine(int x1, int y1, int x2, int y2, int distance, int
     		G = 240,
     		B = 240,
     		Alpha = PV_Linear(192, 0),
    -		Size = 3 * size / 4,
    +		Size = 3 * size / 2,
     		Rotation = angle,
     		BlitMode = GFX_BLIT_Additive
     	};
    -- 
    2.16.0
    
    

-Relationships
related to 0001766resolvedLuchs Acid Drilling: Improve map design 
+Relationships

-Notes

~0006086

occ (reporter)

Hi! There's been a check-in that references this bug. For more information you can visit the repository browser at this address:
https://git.openclonk.org/openclonk.git/commitdiff/735a29103f883eb58b01e5774b6032a1fa49306d

Changeset 735a291 by Julius Michaelis <gitter@liftm.de>
Suggestion for 0001765/Acid Drilling: Add a statue that requests an acid bath.

~0006094

Caesar (developer)

My suggestion for the no build zone: Instead of some NPC that gives a lame text-based explanation, allow building and have the crystals strike objects with lightning (or heck, lasers, magic or whatever).

~0006095

Maikel (developer)

Not a bad idea. That would be a bit more work, because pathfree stuff and other things you can probably do to let buildings survive. Also depends a bit on the mission story line.

~0006096

Caesar (developer)

Currently, the mission has no real story, and it's not part of the main mission story line. If you're not careful and just let me do whatever I'm doing, I'll fill it with random things. (Question: what does a spiderwipf do?)

I tried my idea with lightning… It's probably not too bad at explaining what's going on, but I have to say… man, the lightning looks bad. See attached patch.
+Notes

-Issue History
Date Modified Username Field Change
2016-06-26 06:38 ala New Issue
2016-06-26 06:45 ala Relationship added related to 0001766
2018-01-19 23:09 occ Note Added: 0006086
2018-01-24 19:19 Caesar Note Added: 0006094
2018-01-24 20:17 Maikel Note Added: 0006095
2018-01-24 21:10 Caesar File Added: 0001-Suggestion-for-1765-Acid-Drilling-Crystal-lightning.patch
2018-01-24 21:10 Caesar Note Added: 0006096
2018-01-28 20:29 Caesar Target Version 8.0 => git master
+Issue History