Join our server

Servers down again?

Are the servers down? Game won’t let me go online

Yes, the servers were down, but they are now up and working again

When will the custom mode be fixed so we can distribute custom units to other players the such as 1v1v1 on multiplayer games only the first two armies I can distribute custom units too the others have no army on the boarders to draw units from

I’m currently finishing up the maintenance update and hope to have it out next week or so.

1 Like

:+1::fist:thanks I’ma save my last 2 credits for that can’t wait​:clock430::timer_clock::spiral_calendar:

1 Like

Server down :dizzy_face::dizzy_face::dizzy_face::dizzy_face::dizzy_face::pleading_face::flushed::worried:lol

yes, hmm interesting, seems to be a different cause than previous one, according to the logs this time it was due to a bug I haven’t fixed yet

So what’s up with the next update like do you have anything new to add or is it more improving on what there is?

The next update, which is maintenance update (kind of), doesn’t actually contain any additions or improvements :grimacing: So you might wonder what I have been working on since the last update:

I’ve been separating the code for what I call the Warstage Platform and the Samurai Wars module. The reason is modding support. Everything that’s specific to Samurai Wars, the unit stats and graphics, the sounds and music, the lobby and practice matces, will no longer be built-in with the game, but instead dynamically loaded from a web site. I’ll also make the code for the Samurai Wars module publicly available so that anyone can modify and host their own versions. You’ll be able to do basic modding by editing assets and text files, and with some javascript you can implement story driver scenarios and new victory conditions like king-of-the-hill. I’ll need to write technical documentation on how all this works, but meanwhile here’s a little example of how AI function for the practice scenario looks like:

issueCommands() {
    const playerUnits: Unit[] = [];
    const scriptUnits: Unit[] = [];

    for (const unit of this.battleFederation.objects<Unit>('Unit')) {
        if (!unit.routed && unit.center != null) {
            const units = this.playerAlliance === unit.alliance ? playerUnits : scriptUnits;
            units.push(unit);
        }
    }

    if (playerUnits.length === 0) {
        return;
    }

    if (scriptUnits.length === 0) {
        this.spawnEnemyUnits(playerUnits);
        return;
    }

    const playerCenter = PracticeScenario.findClusterCenter(playerUnits);
    const scriptCenter = PracticeScenario.findClusterCenter(scriptUnits);

    scriptUnits.forEach(unit => {
        const unitCenter = unit.center;

        const targetUnit = PracticeScenario.findNearestUnit(playerUnits, unitCenter);
        if (targetUnit) {
            const targetCenter = targetUnit.center;
            const range = unit['stats.maximumRange'] as number;
            if (range > 0) {
                const diff = vec2.sub(targetCenter, unitCenter);
                const dist = vec2.norm(diff);
                if (dist > 0.9 * range) {
                    const destination = vec2.sub(targetCenter, vec2.mul(diff, 0.9 * range / dist));
                    this.battleFederation.requestService('UpdateCommand', {
                        unit,
                        path: [unitCenter, destination],
                        facing: vec2.angle(vec2.sub(destination, unitCenter)),
                        running: false
                    }).then(() => {}, reason => {
                        console.error(reason);
                    });
                } else if (dist < 0.5 * range) {
                    const destination = vec2.sub(targetCenter, vec2.mul(diff, 0.7 * range / dist));
                    this.battleFederation.requestService('UpdateCommand', {
                        unit,
                        path: [unitCenter, destination],
                        facing: vec2.angle(vec2.sub(destination, unitCenter)),
                        running: true
                    }).then(() => {}, reason => {
                        console.error(reason);
                    });
                } else {
                    this.battleFederation.requestService('UpdateCommand', {
                        unit,
                        path: [],
                        facing: vec2.angle(vec2.sub(targetCenter, unitCenter)),
                        running: false
                    }).then(() => {}, reason => {
                        console.error(reason);
                    });
                }
            } else {
                if (vec2.distance(targetCenter, unitCenter) < 80) {
                    this.battleFederation.requestService('UpdateCommand', {
                        unit,
                        path: [unitCenter, targetCenter],
                        facing: vec2.angle(vec2.sub(targetCenter, unitCenter)),
                        running: false
                    }).then(() => {}, reason => {
                        console.error(reason);
                    });
                } else {
                    let diff = vec2.sub(unitCenter, scriptCenter);
                    const dist = vec2.norm(diff);
                    if (dist > 100) {
                        diff = vec2.mul(diff, 100 / dist);
                    }
                    const destination = vec2.add(playerCenter, diff);
                    this.battleFederation.requestService('UpdateCommand', {
                        unit,
                        path: [unitCenter, destination],
                        facing: vec2.angle(vec2.sub(destination, unitCenter)),
                        running: false
                    }).then(() => {}, reason => {
                        // console.error(reason);
                    });
                }
            }
        }
    });
}
1 Like

So we need to learn javascript and coding to access full game features in the future…in a way???
That will be a problem for me, as I know fuck all about computers! I’m just a simple guy who is God at this game…

Don’t panic, you don’t need to know any coding in order to play. What I’m saying that this opens up the game so that others can do cool things like automatic bookkeeping of campaigns, etc.

Well better start learning bro!!!

fuckk