Search Results
Searched for posts by fejoa in all forums

Showing results 771 - 780 out of 1011 total
Modify your search
Posted by fejoa, Jun 13, 2014 at 4:27 pm
Great scripting Red! I'm a big fan of BoundedRandom
Can't wait for screenshots.
Posted by fejoa, Jun 13, 2014 at 4:11 pm
EireMadHatter wrote
What about if say theres a material called soot or charred.
.....like a black water for now.....but it covers stuff similar to how water does. When items burn.

This is a good idea. There are powder materials, like sand, snow and gunpowder available, so soot would be a natural extension to this concept.

Well, the results go as follows:
03.png: Get into the level. What the? A flaming wand of striking!
04.png: This kobold's pants are on fire! It is getting ridiculous.
05.png: get stick with pick-axe (it is not on fire)
07.png: apply the stick...
08.png: the stick is now on fire! Some output thingees indicate the state of the flag responsible for determining whether the object is on fire or not.
09.png: what does the rest of the level look like? There is a flaming spider!

As you can observe, there is lots of functionality missing. Like for instance, there is no discrimination yet between items in a stack that are on fire, or not on fire, so these items just pile together and look silly at the moment.

It begs the question, why are only some of the objects in the level on fire?
This is because when the flag is instantiated, it is not initialised to zero first. Most of the locations in the memory contain the integer zero, but there are still some memory locations that contain garbage, and so these are non zero. The variable Burning will take on a non-zero value, and so this will reveal itself as a spot fire in a level in the game.
My question is, in the code added in object.h, how do I initialise the truth variable Burning to zero generally?

Code:
//In object.h:
class object : public entity, public id
{
	public:
	...
	truth Burning; //Added
	virtual void SetIsBurning(truth What) {Burning = What;} //Added
	virtual truth IsBurning() const { return Burning; } //Added
	

//In miscitem.h:
ITEM(stick, item)
{
	public:
		virtual truth Apply(character*); //Added
		virtual truth IsAppliable(ccharacter*) const { return true; } //Added
	protected:
		virtual void AddPostFix(festring& String, int) const { AddLumpyPostFix(String); }
		virtual truth ShowMaterial() const { return false; }
		virtual truth WeightIsIrrelevant() const { return true; }
};

//in miscitem.cpp
truth stick::Apply(character* Applier) //Added this function
{
  if(Applier->IsPlayer())
	{
    ADD_MESSAGE("You light %s.", CHAR_NAME(DEFINITE));
		ADD_MESSAGE("Burning is %d", Burning);
		ADD_MESSAGE("IsBurning is %d", IsBurning());
	}

			SetIsBurning(true);
			UpdatePictures();
			ADD_MESSAGE("The %s now burns brightly.", CHAR_NAME(DEFINITE));
			ADD_MESSAGE("Burning is %d", Burning);
			ADD_MESSAGE("IsBurning is %d", IsBurning());
			return true;
}

//in object.cpp:
void object::UpdatePictures(graphicdata& GraphicData, v2 Position, int SpecialFlags, alpha MaxAlpha, int GraphicsContainerIndex, bposretriever BitmapPosRetriever) const
{
	...
	
	alpha Alpha;
	// added this new condition below
	if(IsBurning()) //is burning is sometimes initially filled with crap, so Burning should be initialised to zero
	{
		SpecialFlags &= ST_FLAMES; //this should be the |= operator, not the &= operator. 
	}

Posted by fejoa, Jun 13, 2014 at 11:23 am
red_kangaroo wrote
However, something is broken and I cannot find out what. Would someone be so nice and tell me what's wrong?

In CLIVAN the river was outside. The room size is 1x1. The level generator automatically fills the level with earth, and then connects the rooms via tunnels. By having a 1x1 sized room, it is probably malfunctioning. As per 4zb4's questions above, do you get an error, or is the river feature simply missing?
Posted by fejoa, Jun 12, 2014 at 2:17 pm
Ok, just a little update:
I am currently working on getting a visual effect going for flames. The reason for this is because I want to be able to have a visual cue for how the fire will spread from item to item. I have set my sights on using the existing "flaming sword" type graphics, for now, in lieu of more awesome looking fire. (for instance, the flame base goes along the top of the bitmap main material, but I would like to try make it go from the bottom).
I am trying step by step to light a single stick of balsa wood on fire, by 'a'pplying it. So far I managed to light the whole dungeon on fire, but not the stick. I just got it working. It is quite hilarious and I promise to post pictures of this soon.
I know why the dungeon goes up in flames, but I don't know how to set the truth variable to zero initially. I will post code as well, so you can have a look and maybe give a few pointers.
Right now, a cold beer.
Posted by fejoa, May 31, 2014 at 4:07 am
JoKe wrote
Material softening as it stands is terribly overpowered IMO, as even blocking attacks with Eptyron seems to soften the striker's weapon. Going against one of these means that the moment your weapon is softened, you lose the accustomization bonus since it's not shared between materials, not to even mention having to burn through additional SoCMs. The soften also currently works against Neerc and Justifier, neither of which you can change the material of yourself.

So long as the softens are restricted to a single named NPC or such and the melee block soften nerfed, it could be fine.

I agree, the material softening is overpowered and untested. The softening regime used by Eptyron is completely different to the one implemented for the alchemists. This was because I implemented Eptyron first, and then decided to create a "SoftenedMaterial" for each material in the material tree so I could make a relatively straightforward method for use with alchemists. I never got around to porting the latter method to Eptyron.
The bugs where softening works against Neerc and Justifier are indeed true bugs, so I will attend to those. I didn't really know what to expect when I put it in the game. Softening while blocking needs to be eliminated too. The weapon special effect (softening) probably needs to be made less frequent.

An alternative to having an artifact with this softening property would be to code a type of steel material, let's call it "goblin steel". You can't wish for this material, or harden to it, so you'd have to find it. A sword made from this material can have the property of softening the materials of the target during one in 20 successful hits or so. The caveat is that the softening property is only effective if you are polymorphed into a goblinoid (either kobold, goblin or orc). Could make INT a factor in how frequent the effect occurs.

red_kangaroo wrote
Goblin warlocks are awsome, they generate in large numbers when your are strong enough and I was able to slay them without giving them any chance of useing their wands, yielding me literally HUGE number of teleport wands.
It seems like warlocks need to have only mirrored wands in their inventory. That way the player can't accumulate them.

red_kangaroo wrote
grenadier dwarves do not throw any grenades in my experience. They mostly blow themselves up and set off their grenades this way, trapping you in a cloud of mustard gas.
I'll have to look more closely at this, I know it is not 100% there yet I think they also throw grenades at walls when the player is on the other side of the wall, so their hostile detection scheme needs to check for walls in the intervening space.

I'll attend to these additions once fire is off the ground.
Posted by fejoa, May 30, 2014 at 10:39 am
I have compiled a list of things from CLIVAN that I think are in keeping with the game and serve to make the game more challenging. They are mostly the additions that I am satified have more or less full functionality. I would like to share this list with you so I can gain feedback about whether you agree that they should be implemented in main line development, or whether some should be omitted or improved. Question marks denote things that I am not sure would be necessary additions. Most things will be revised as they are implemented, to ensure that they are balanced and operating properly.

The list:

Things:

- Throwing (AI)
- picking up items to throw (AI)
- Wand zapping (AI)
- Revision to sweat amount (make this proportional to END)
- Material softening algorithm (for Eptyron, Alchemists)
- Vampirism state
- Dip bodyparts into potions and fountains

Items:

- Eptyron
? Maps

Characters:

- Fruit bat
- Uldra
? Okapi
- Vampire
- Orc Shaman
- Goblin Warlock
- Kobold Alchemist
- Grenadier dwarfs
? Bare-hands doctor

Misc:

- Add Vladimir and Ivan image by blob to IVAN_LEVEL entering screen
- Change the maximum Attnam continent size to 700, down from 1000

Posted by fejoa, May 30, 2014 at 8:49 am
Yeah the free vodka seems like it was partly finished. Put some guards down there and it will be all good for the time being, until the catacomb quest is fleshed out a bit more.
Posted by fejoa, May 22, 2014 at 4:45 pm
This is all good stuff which I am taking on board. I'm starting with some visual effects so that I can see where the flames are. Then I can get to work on making them propagate through the game environment.
Posted by fejoa, May 21, 2014 at 3:46 pm
EDIT 20141116 - I figure I can use this first post to put up the to-do list:

Synchronised to sandbox repo:

20141116 - Graded charring in the bitmap, achieved by selecting the RGB colour with the max intensity, RSHIFT max intensity by 2, RSHIFT old RGB by 3 and then add these together with Max>>2 to form the new 'burnt' RGB values
Different materials now have different burn times. Introduced a BurnModifier() which determines the duration of burning based on material strength, fire resistance and density, according to the formula (500 + Den + ((Str * FR) >> 1))
20141116 - Made it so that the words "(on fire)" appear in the post-fix of meleeweapons and armors that are on fire, a la fluids (covered in ...)
20141116 - Prevented wooden flaming swords from catching fire. Achieved this via CanBeBurned in item.h and item.dat and test condition in item::ReceiveDamage
20141116 - Caused burning phoenix feather to reset and stop burning once it gets completely burnt. Wondering if this needs a separate message.
20141116 - Introduced code for extinguishing flames via the function Extinguish() (opposite function to Ignite()) - wielded equipment graphics still do not extinguish for some reason
20141116 - Ghosts, powder, fluids were all burning. Even the snow in Attnam was on fire! This was fixed by adding "virtual int IsBurning() const { return 0; }" to liquids (therefore powders) and gasses. Not ideal means of fixing this. it should really be fixed at the level of object.h

Updated the Activation energy threshold to the following formula:
ActivationEnergy = 0.5 x MaterialStrength + 5 x MaterialFireResistance + FireResistanceItemEnchantment
Revised hence the FireResistance of all materials


 key:
 (YYYYMMDD) = complete
 BF = bugfix
 FE = feature
 BA = balancing
 
 To do:
 
 BF - Graded charring in the bitmap
 BF - Whenever a meleeweapon or something with a secondary material is completely burnt, then a lump of the secondary material is created
 BF - Flames do not go away on wielded equipment when extiguished. Clue: The flames do go away when the (phoenix feather) sword is covered in blood
 BF - Flames do not animate when a stick of balsa is ignited (item sitting far away when ignited??)
 
 FE - Once something is on fire, try to get it to infect the rest of the stack and player inventory
 FE - Introduce the 'on fire' postfix, for (all) things that are presently on fire
 FE - Include wetness in the formula for activation energy
 FE - Handle the duration of burning via mass-density, fire resistance, enchantments and material wetness
 FE - Implement ways of putting flames out
 FE - Introduce thermal energy (integrate fire damage over cascading explosions)
 FE - Chance to decrement enchantment when gear is burnt (magic fire?)
 FE - Flaming sword burning effect
 FE - Smashing lanterns should be a source of fire
 FE - Get tailors to repair burnt fabric
 FE - Burning bodyparts
 FE - ?Create smoke in tunnels
 FE - ?Vomit to extinguish fires
 FE - Burning objects persisting in the bonefile
 FE - Burning golems
 FE - Burning phoenix feather golems
 FE - Make it so melee weapons that are on fire spread fire to enemies
 
 BA - Hard code ironalloys so that they cannot burn (avoiding (possible?/untested) conflict with rusting graphics)
 BA - Give goblinoid magic users mirrored wands
  
 Partially done:
 
 20141116 - FE - Destroy objects once they are completely burnt up
 20141116 - FE - Special property for phoenix feather material
 20141116 - FE - Introduce the 'on fire' postfix, for meleeweapons and armors that are presently on fire
 
 20141116 - BA - Improve ignition by way of explosions. Get Explosion Strength to scale nice and linearly with Activation Energy
  
 Complete:
 
 20141116 - BF - Stop - f.ex. wooden - flaming swords from catching fire
 20141116 - BF - Ghosts, powder, fluids are all burning. Even the snow in Attnam is on fire!
 
 20141116 - BA - Prevent the TestActivationEnergy algorithm from testing objects that cannot burn anyway
 


Original post, for history:

So far, I have been able to light the player on fire.

in bodypart.cpp:
int rightarm::GetSpecialFlags() const { return !GetMaster()->IsPlayer() ? SpecialFlags|ST_RIGHT_ARM : SpecialFlags|ST_RIGHT_ARM|ST_FLAME_1; }

EDIT: Latest discovery is that the above code causes the game to crash when you sever your right arm :\
Posted by fejoa, May 21, 2014 at 2:30 pm
Batman? wrote
what would the money be used for?

Buying underpants? I'd do it just for underpants.