Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
You can download the mod template from this guide: https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=484818341 .
You need to put the .png into the template's content folder.
I recommend the dnSpy for reading the source code since it's a bit more capable than ILSpy. In dnSpy you can just open the DuckGame.exe and see all the classes. I'm currently also learning to mod the game, but if you need any help i can send the piss gun mod's source code that i made.
Crate crate = new Crate(0, 0);
crate.position = Offset(this._barrelOffsetTL);
crate.hSpeed = this.barrelVector.x * 7f;
crate.vSpeed = this.barrelVector.y * 7f;
Level.Add((Thing)crate);
}
}
base.OnPressAction();
}
}
}
public CrateGun(float xval,float yval) : base(xval, yval)
{
this.graphic = new Sprite(GetPath("crateGun"));
this.ammo = 4;
this.center = new Vec2(16f, 16f);
this.collisionOffset = new Vec2(-8f, -4f);
this.collisionSize = new Vec2(16f, 9f);
this._barrelOffsetTL = new Vec2(27f, 14f);
}
public override void Fire()
{
}
public override void OnPressAction()
{
if (this.ammo > 0)
{
this.ammo--;
if (this.isServerForObject)
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DuckGame;
namespace FS_Items_Mod.src
{
[EditorGroup("testing")]
class CrateGun : Gun
didn't copy the whole thing
{
}
public override void OnPressAction()
{
if (this.ammo > 0)
{
this.ammo--;
if (this.isServerForObject)
{
Crate crate = new Crate(0, 0);
crate.position = Offset(this._barrelOffsetTL);
crate.hSpeed = this.barrelVector.x * 7f;
crate.vSpeed = this.barrelVector.y * 7f;
Level.Add((Thing)crate);
}
}
base.OnPressAction();
}
}
}
using DuckGame;
namespace FS_Items_Mod.src
{
[EditorGroup("testing")]
class CrateGun : Gun
{
public CrateGun(float xval,float yval) : base(xval, yval)
{
this.graphic = new Sprite(GetPath("crateGun"));
this.ammo = 4;
this.center = new Vec2(16f, 16f);
this.collisionOffset = new Vec2(-8f, -4f);
this.collisionSize = new Vec2(16f, 9f);
this._barrelOffsetTL = new Vec2(27f, 14f);
}