Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old September 6, 2021, 17:41   #181
backwardsEric
Adept
 
Join Date: Aug 2019
Posts: 217
backwardsEric is on a distinguished road
Reading out the element from the resist looks correct. You didn't pass the result of grenade_brand() as the element for the effect (I assume you would want it to replace ELEM_FIRE). If you want distinguish the weak and strong brands, you'd want to get the multiplier as well.

As for the targeting, the "other" parameter doesn't affect that for EF_STRIKE. Someone else will have to chime in how to best set the target for this case.
backwardsEric is offline   Reply With Quote
Old September 8, 2021, 00:54   #182
Julian
Apprentice
 
Join Date: Apr 2021
Posts: 87
Julian is on a distinguished road
Quote:
Originally Posted by Nick View Post
The "->" is if you have a pointer to the struct (so if grid was a struct loc *), if it's just the struct you need a ".". So grid.y and grid.x should work.
As a side note, one usually shouldn’t pass structs directly, as it makes the compiler copy it onto the stack. Pass by reference with a const declaration instead. (Not that it’s a big deal for a grid, which is tiny.)
Julian is offline   Reply With Quote
Old September 8, 2021, 11:50   #183
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 56
Posts: 9,163
Donated: $60
Nick will become famous soon enoughNick will become famous soon enough
Quote:
Originally Posted by Julian View Post
As a side note, one usually shouldn’t pass structs directly, as it makes the compiler copy it onto the stack. Pass by reference with a const declaration instead. (Not that it’s a big deal for a grid, which is tiny.)
Yeah, in most of these case the struct loc has replaced two int arguments, so it's pretty much neutral.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old September 13, 2021, 00:23   #184
Grenoble
Rookie
 
Join Date: Aug 2021
Posts: 7
Grenoble is on a distinguished road
Still up?

Quote:
Originally Posted by will_asher View Post
So, I'm looking into making a new variant since I just came back to Angband, and I always think the most fun thing to do with a game is tweak it, tinker with it, tamper with it, customize it, alter it, twist it, slime it, and otherwise modify it. But I'm going to need some help because I am much more of a hack than an actual coder/programmer, so this thread is where I'll ask questions.
Still messing around with this? I just went down this rabbit hole with the ToME variant. I wanted to build it on Win 10. I could sort of read c++ when I started and now I know how to debug a linking problem with a library. It was an amazing journey and I hope you'll keep at it. Here are some things I'd wish I knew, etc:
  • I'd really recommend starting with a version that uses cmake. The integration with vs 2019 exposes a lot of features it would have taken forever to find on my own. It was easier for me to "get" cmake and then go back and understand older makefiles.
  • C++ encompasses C (I didn't/still don't really get this), so VS will see your project as C++. I forked someone's code and then created a new project from existing files.
  • The compiler you'll end up using is determined by the "triplet" you're targeting and the platform you're building on. Triplet is a standard term used in cross compiling as a way to completely capture the target environment (cpu, os, compiler, runtime, etc) in a single convenient name. If you were building on windows for linux, for example, you might use gcc through mingw.
  • The link above is from the home of a package manager that can handle common libraries and tools for windows. It turned into a good resource for me.
  • Most of the documentation you'll run into is hot garbage. Find someone you can talk to when you are well and truly stuck.
Grenoble is offline   Reply With Quote
Old September 13, 2021, 05:57   #185
will_asher
DaJAngband Maintainer
 
will_asher's Avatar
 
Join Date: Apr 2007
Location: San Antonio, TX
Posts: 1,123
Donated: $10
will_asher is on a distinguished road
Quote:
Originally Posted by Grenoble View Post
Still messing around with this? I just went down this rabbit hole with the ToME variant. I wanted to build it on Win 10. I could sort of read c++ when I started and now I know how to debug a linking problem with a library. It was an amazing journey and I hope you'll keep at it. Here are some things I'd wish I knew, etc:
Thanks for the tips. I am pretty close to releasing an alpha version for other people to play (and help me find & fix bugs).
I've been using Visual Studio 2019, and I don't touch the make files. I've never used cmake.
__________________
Will_Asher
aka LibraryAdventurer

My old variant DaJAngband:
http://sites.google.com/site/dajangbandwebsite/home (defunct and so old it's forked from Angband 3.1.0 -I think- but it's probably playable...)
will_asher is offline   Reply With Quote
Old September 13, 2021, 19:49   #186
Grenoble
Rookie
 
Join Date: Aug 2021
Posts: 7
Grenoble is on a distinguished road
Oh nice! Subscribed to this thread, please post here when you release. Congrats!

Some of the best documentation I found on building older software came from forums like this. Anything you can post on your process would be interesting to me.

Last edited by Grenoble; September 13, 2021 at 20:03.
Grenoble is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
can we make identify more common ? Sky Vanilla 16 September 10, 2017 11:20
Make Artistry automatic bagori nd Sil 4 September 26, 2016 19:22
How many variant developers/maintainers have beaten their own variant? Delver Variants 12 June 5, 2009 10:08
Variant writing.. quickstart guide? Also, Hengband variant suggestions? dzhang Variants 34 April 1, 2009 01:45
Trying to make my own variant bpleshek Variants 8 September 15, 2008 21:42


All times are GMT +1. The time now is 07:49.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.